Merge with Linux 2.5.59.
[linux-2.6/linux-mips.git] / include / asm-ppc64 / bug.h
blob9a52a5c879ba6cbf9292cb1380ba27ede774d891
1 #ifndef _PPC64_BUG_H
2 #define _PPC64_BUG_H
4 #include <linux/config.h>
6 /*
7 * Define an illegal instr to trap on the bug.
8 * We don't use 0 because that marks the end of a function
9 * in the ELF ABI. That's "Boo Boo" in case you wonder...
11 #define BUG_OPCODE .long 0x00b00b00 /* For asm */
12 #define BUG_ILLEGAL_INSTR "0x00b00b00" /* For BUG macro */
14 #ifndef __ASSEMBLY__
16 #ifdef CONFIG_XMON
17 struct pt_regs;
18 extern void xmon(struct pt_regs *excp);
19 #define BUG() do { \
20 printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \
21 xmon(0); \
22 } while (0)
23 #else
24 #define BUG() do { \
25 printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \
26 __asm__ __volatile__(".long " BUG_ILLEGAL_INSTR); \
27 } while (0)
28 #endif
30 #define PAGE_BUG(page) do { BUG(); } while (0)
32 #endif
33 #endif