From 9e5350557e7ba76771c66155132c117a69a0508e Mon Sep 17 00:00:00 2001 From: Russell King Date: Sun, 12 Jan 2003 23:24:04 -0800 Subject: [PATCH] use 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. --- include/asm-alpha/bug.h | 14 ++++++++++++++ include/asm-alpha/page.h | 8 -------- 2 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 include/asm-alpha/bug.h (limited to 'include/asm-alpha') diff --git a/include/asm-alpha/bug.h b/include/asm-alpha/bug.h new file mode 100644 index 000000000000..0ff718cfdf53 --- /dev/null +++ b/include/asm-alpha/bug.h @@ -0,0 +1,14 @@ +#ifndef _ALPHA_BUG_H +#define _ALPHA_BUG_H + +#include + +/* ??? Would be nice to use .gprel32 here, but we can't be sure that the + function loaded the GP, so this could fail in modules. */ +#define BUG() \ + __asm__ __volatile__("call_pal %0 # bugchk\n\t"".long %1\n\t.8byte %2" \ + : : "i" (PAL_bugchk), "i"(__LINE__), "i"(__FILE__)) + +#define PAGE_BUG(page) BUG() + +#endif diff --git a/include/asm-alpha/page.h b/include/asm-alpha/page.h index 43e414a33d95..2602b3685fe5 100644 --- a/include/asm-alpha/page.h +++ b/include/asm-alpha/page.h @@ -59,14 +59,6 @@ typedef unsigned long pgprot_t; #endif /* STRICT_MM_TYPECHECKS */ -/* ??? Would be nice to use .gprel32 here, but we can't be sure that the - function loaded the GP, so this could fail in modules. */ -#define BUG() \ - __asm__ __volatile__("call_pal %0 # bugchk\n\t"".long %1\n\t.8byte %2" \ - : : "i" (PAL_bugchk), "i"(__LINE__), "i"(__FILE__)) - -#define PAGE_BUG(page) BUG() - /* Pure 2^n version of get_order */ extern __inline__ int get_order(unsigned long size) { -- cgit v1.2.3