Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9791af55 authored by Yoshinori Sato's avatar Yoshinori Sato Committed by Linus Torvalds
Browse files

h8300: GENERIC_BUG support



CONFIG_GENERIC_BUG support.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: default avatarYoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 81d423e2
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -62,6 +62,10 @@ config GENERIC_TIME
	bool
	default y

config GENERIC_BUG
        bool
        depends on BUG

config TIME_LOW_RES
	bool
	default y
+4 −0
Original line number Diff line number Diff line
#ifndef _H8300_BUG_H
#define _H8300_BUG_H

/* always true */
#define is_valid_bugaddr(addr) (1)

#include <asm-generic/bug.h>
#endif
+2 −0
Original line number Diff line number Diff line
@@ -155,4 +155,6 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz

#define arch_align_stack(x) (x)

void die(char *str, struct pt_regs *fp, unsigned long err);

#endif /* _H8300_SYSTEM_H */
+2 −1
Original line number Diff line number Diff line
@@ -114,9 +114,10 @@ int module_finalize(const Elf_Ehdr *hdr,
		    const Elf_Shdr *sechdrs,
		    struct module *me)
{
	return 0;
	return module_bug_finalize(hdr, sechdrs, me);
}

void module_arch_cleanup(struct module *mod)
{
	module_bug_cleanup(mod);
}
+11 −6
Original line number Diff line number Diff line
@@ -20,12 +20,14 @@
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/bug.h>

#include <asm/system.h>
#include <asm/irq.h>
#include <asm/traps.h>
#include <asm/page.h>
#include <asm/gpio.h>

static DEFINE_SPINLOCK(die_lock);

/*
 * this must be called very early as the kernel might
@@ -94,16 +96,19 @@ static void dump(struct pt_regs *fp)
	printk("\n\n");
}

void die_if_kernel (char *str, struct pt_regs *fp, int nr)
void die(char *str, struct pt_regs *fp, unsigned long err)
{
	extern int console_loglevel;
	static int diecount;

	if (!(fp->ccr & PS_S))
		return;
	oops_enter();

	console_loglevel = 15;
	console_verbose();
	spin_lock_irq(&die_lock);
	report_bug(fp->pc, fp);
	printk(KERN_EMERG "%s: %04lx [#%d] ", str, err & 0xffff, ++diecount);
	dump(fp);

	spin_unlock_irq(&die_lock);
	do_exit(SIGSEGV);
}

Loading