diff options
Diffstat (limited to 'include/asm-ppc')
| -rw-r--r-- | include/asm-ppc/bug.h | 21 | ||||
| -rw-r--r-- | include/asm-ppc/page.h | 3 | ||||
| -rw-r--r-- | include/asm-ppc/processor.h | 13 |
3 files changed, 21 insertions, 16 deletions
diff --git a/include/asm-ppc/bug.h b/include/asm-ppc/bug.h new file mode 100644 index 000000000000..848c69a703b5 --- /dev/null +++ b/include/asm-ppc/bug.h @@ -0,0 +1,21 @@ +#ifndef _PPC_BUG_H +#define _PPC_BUG_H + +#include <linux/config.h> +#include <asm/system.h> /* for xmon definition */ + +#ifdef CONFIG_XMON +extern void xmon(struct pt_regs *); +#define BUG() do { \ + printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \ + xmon(0); \ +} while (0) +#else +#define BUG() do { \ + printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \ + __asm__ __volatile__(".long 0x0"); \ +} while (0) +#endif +#define PAGE_BUG(page) do { BUG(); } while (0) + +#endif diff --git a/include/asm-ppc/page.h b/include/asm-ppc/page.h index e0429c2b5bc7..ff0f8f9acf62 100644 --- a/include/asm-ppc/page.h +++ b/include/asm-ppc/page.h @@ -14,9 +14,6 @@ #define KERNELBASE PAGE_OFFSET #ifndef __ASSEMBLY__ -#include <asm/processor.h> /* for BUG definition */ - -#define PAGE_BUG(page) do { BUG(); } while (0) #define STRICT_MM_TYPECHECKS diff --git a/include/asm-ppc/processor.h b/include/asm-ppc/processor.h index 6c7193953195..b958da9e3c13 100644 --- a/include/asm-ppc/processor.h +++ b/include/asm-ppc/processor.h @@ -718,19 +718,6 @@ extern inline void prefetchw(const void *x) #define spin_lock_prefetch(x) prefetchw(x) -#ifdef CONFIG_XMON -extern void xmon(struct pt_regs *); -#define BUG() do { \ - printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \ - xmon(0); \ -} while (0) -#else -#define BUG() do { \ - printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \ - __asm__ __volatile__(".long 0x0"); \ -} while (0) -#endif - #endif /* !__ASSEMBLY__ */ #endif /* __ASM_PPC_PROCESSOR_H */ |
