From fd43fe19b830d6cd0eba08a6c6a5f71a6bd9c1b0 Mon Sep 17 00:00:00 2001 From: Chris Zankel Date: Sun, 10 Dec 2006 02:18:47 -0800 Subject: [PATCH] xtensa: fix irq and misc fixes Update the architecture specific interrupt handling code for Xtensa to support the new API. Use generic BUG macros in bug.h, and some minor fixes. Signed-off-by: Chris Zankel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-xtensa/bug.h | 25 +------------------------ include/asm-xtensa/byteorder.h | 4 ++-- include/asm-xtensa/irq_regs.h | 1 + include/asm-xtensa/unistd.h | 3 +++ include/asm-xtensa/xtensa/config-linux_be/tie.h | 2 +- 5 files changed, 8 insertions(+), 27 deletions(-) create mode 100644 include/asm-xtensa/irq_regs.h (limited to 'include/asm-xtensa') diff --git a/include/asm-xtensa/bug.h b/include/asm-xtensa/bug.h index 56703659b20..3e52d72712f 100644 --- a/include/asm-xtensa/bug.h +++ b/include/asm-xtensa/bug.h @@ -13,29 +13,6 @@ #ifndef _XTENSA_BUG_H #define _XTENSA_BUG_H -#include - -#define ILL __asm__ __volatile__ (".byte 0,0,0\n") - -#ifdef CONFIG_KALLSYMS -# define BUG() do { \ - printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \ - ILL; \ -} while (0) -#else -# define BUG() do { \ - printk("kernel BUG!\n"); \ - ILL; \ -} while (0) -#endif - -#define BUG_ON(condition) do { if (unlikely((condition)!=0)) BUG(); } while(0) -#define PAGE_BUG(page) do { BUG(); } while (0) -#define WARN_ON(condition) do { \ - if (unlikely((condition)!=0)) { \ - printk ("Warning in %s at %s:%d\n", __FUNCTION__, __FILE__, __LINE__); \ - dump_stack(); \ - } \ -} while (0) +#include #endif /* _XTENSA_BUG_H */ diff --git a/include/asm-xtensa/byteorder.h b/include/asm-xtensa/byteorder.h index 0b1552569aa..0ba72ddbf88 100644 --- a/include/asm-xtensa/byteorder.h +++ b/include/asm-xtensa/byteorder.h @@ -14,7 +14,7 @@ #include #include -static __inline__ __const__ __u32 ___arch__swab32(__u32 x) +static __inline__ __attribute_const__ __u32 ___arch__swab32(__u32 x) { __u32 res; /* instruction sequence from Xtensa ISA release 2/2000 */ @@ -29,7 +29,7 @@ static __inline__ __const__ __u32 ___arch__swab32(__u32 x) return res; } -static __inline__ __const__ __u16 ___arch__swab16(__u16 x) +static __inline__ __attribute_const__ __u16 ___arch__swab16(__u16 x) { /* Given that 'short' values are signed (i.e., can be negative), * we cannot assume that the upper 16-bits of the register are diff --git a/include/asm-xtensa/irq_regs.h b/include/asm-xtensa/irq_regs.h new file mode 100644 index 00000000000..3dd9c0b7027 --- /dev/null +++ b/include/asm-xtensa/irq_regs.h @@ -0,0 +1 @@ +#include diff --git a/include/asm-xtensa/unistd.h b/include/asm-xtensa/unistd.h index 2e1a1b997e7..15b0932523d 100644 --- a/include/asm-xtensa/unistd.h +++ b/include/asm-xtensa/unistd.h @@ -218,6 +218,8 @@ #define SYSXTENSA_COUNT 5 /* count of syscall0 functions*/ +#ifdef __KERNEL__ + /* * "Conditional" syscalls * @@ -230,6 +232,7 @@ #define __ARCH_WANT_SYS_UTIME #define __ARCH_WANT_SYS_LLSEEK #define __ARCH_WANT_SYS_RT_SIGACTION + #endif /* __KERNEL__ */ #endif /* _XTENSA_UNISTD_H */ diff --git a/include/asm-xtensa/xtensa/config-linux_be/tie.h b/include/asm-xtensa/xtensa/config-linux_be/tie.h index 3c2e514602f..07c6d1ca458 100644 --- a/include/asm-xtensa/xtensa/config-linux_be/tie.h +++ b/include/asm-xtensa/xtensa/config-linux_be/tie.h @@ -115,7 +115,7 @@ /* ... */ -#ifdef _ASMLANGUAGE +#ifdef __ASSEMBLER__ /* * Assembly-language specific definitions (assembly macros, etc.). */ -- cgit v1.2.3