summaryrefslogtreecommitdiff
path: root/include/asm-xtensa/bitops.h
diff options
context:
space:
mode:
authorChris Zankel <chris@zankel.net>2007-05-31 17:47:01 -0700
committerChris Zankel <chris@zankel.net>2007-05-31 17:47:01 -0700
commitde4f6e5b41bef50fc981410ae8380f27f4e93bf8 (patch)
tree39e467255d33f89becf50425b019ce5cf402681f /include/asm-xtensa/bitops.h
parent176fd6c96dcbc263eb1c61eae9fe2a33f23a876d (diff)
[XTENSA] clean-up header files
The header files in the asm-xtensa directory are not clean and 'make headers_check' fails. This is a first patch to fix most of the header files. It removes unnecessary include statements and adds some that are required for building the kernel. The linker script required some updates or the linking stage would fail. Signed-off-by: Chris Zankel <chris@zankel.net>
Diffstat (limited to 'include/asm-xtensa/bitops.h')
-rw-r--r--include/asm-xtensa/bitops.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/include/asm-xtensa/bitops.h b/include/asm-xtensa/bitops.h
index 96303dff3ee4..1c1e0d933eea 100644
--- a/include/asm-xtensa/bitops.h
+++ b/include/asm-xtensa/bitops.h
@@ -57,9 +57,6 @@ static inline int __ffs(unsigned long x)
return 31 - __cntlz(x & -x);
}
-
-#ifdef __KERNEL__
-
/*
* ffs: Find first bit set in word. This is defined the same way as
* the libc and compiler builtin ffs routines, therefore
@@ -97,11 +94,15 @@ static inline int fls (unsigned int x)
#include <asm-generic/bitops/ext2-non-atomic.h>
#ifdef __XTENSA_EL__
-# define ext2_set_bit_atomic(lock,nr,addr) test_and_set_bit((nr),(addr))
-# define ext2_clear_bit_atomic(lock,nr,addr) test_and_clear_bit((nr),(addr))
+# define ext2_set_bit_atomic(lock,nr,addr) \
+ test_and_set_bit((nr), (unsigned long*)(addr))
+# define ext2_clear_bit_atomic(lock,nr,addr) \
+ test_and_clear_bit((nr), (unsigned long*)(addr))
#elif defined(__XTENSA_EB__)
-# define ext2_set_bit_atomic(lock,nr,addr) test_and_set_bit((nr) ^ 0x18, (addr))
-# define ext2_clear_bit_atomic(lock,nr,addr) test_and_clear_bit((nr)^0x18,(addr))
+# define ext2_set_bit_atomic(lock,nr,addr) \
+ test_and_set_bit((nr) ^ 0x18, (unsigned long*)(addr))
+# define ext2_clear_bit_atomic(lock,nr,addr) \
+ test_and_clear_bit((nr) ^ 0x18, (unsigned long*)(addr))
#else
# error processor byte order undefined!
#endif