diff options
| author | Russell King <rmk@arm.linux.org.uk> | 2003-01-12 23:24:04 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@penguin.transmeta.com> | 2003-01-12 23:24:04 -0800 |
| commit | 9e5350557e7ba76771c66155132c117a69a0508e (patch) | |
| tree | 3167c53fece393622aaa9826b06e71b4187e35c1 /include/asm-m68k | |
| parent | fb5805fb279e47410296f8739af1a02143f48a8a (diff) | |
[PATCH] use <asm/bug.h> for BUG() defines
This patch moves BUG() and PAGE_BUG() from asm/page.h into asm/bug.h.
We also fix up linux/dcache.h, which included asm/page.h for the sole
purpose of getting the BUG() definition.
Since linux/kernel.h and linux/smp.h make use of BUG(), asm/bug.h is
included there as well.
In addition, linux/jbd.h did not contain a clear path with which to
obtain the archtecture BUG() definition, but did contain its own
definition.
Diffstat (limited to 'include/asm-m68k')
| -rw-r--r-- | include/asm-m68k/bug.h | 28 | ||||
| -rw-r--r-- | include/asm-m68k/page.h | 22 |
2 files changed, 28 insertions, 22 deletions
diff --git a/include/asm-m68k/bug.h b/include/asm-m68k/bug.h new file mode 100644 index 000000000000..92c5cc5c3c09 --- /dev/null +++ b/include/asm-m68k/bug.h @@ -0,0 +1,28 @@ +#ifndef _M68K_BUG_H +#define _M68K_BUG_H + +#include <linux/config.h> + +#ifdef CONFIG_DEBUG_BUGVERBOSE +#ifndef CONFIG_SUN3 +#define BUG() do { \ + printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \ + asm volatile("illegal"); \ +} while (0) +#else +#define BUG() do { \ + printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \ + panic("BUG!"); \ +} while (0) +#endif +#else +#define BUG() do { \ + asm volatile("illegal"); \ +} while (0) +#endif + +#define PAGE_BUG(page) do { \ + BUG(); \ +} while (0) + +#endif diff --git a/include/asm-m68k/page.h b/include/asm-m68k/page.h index 7ca3578dfa8f..6c09c4f01e07 100644 --- a/include/asm-m68k/page.h +++ b/include/asm-m68k/page.h @@ -178,28 +178,6 @@ static inline void *__va(unsigned long x) #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory) #define pfn_valid(pfn) virt_addr_valid(pfn_to_virt(pfn)) -#ifdef CONFIG_DEBUG_BUGVERBOSE -#ifndef CONFIG_SUN3 -#define BUG() do { \ - printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \ - asm volatile("illegal"); \ -} while (0) -#else -#define BUG() do { \ - printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \ - panic("BUG!"); \ -} while (0) -#endif -#else -#define BUG() do { \ - asm volatile("illegal"); \ -} while (0) -#endif - -#define PAGE_BUG(page) do { \ - BUG(); \ -} while (0) - #endif /* __ASSEMBLY__ */ #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ |
