aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-xtensa/bitops.h
diff options
context:
space:
mode:
authorChris Zankel <chris@zankel.net>2007-05-31 20:47:01 -0400
committerChris Zankel <chris@zankel.net>2007-05-31 20:47:01 -0400
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)
57 return 31 - __cntlz(x & -x); 57 return 31 - __cntlz(x & -x);
58} 58}
59 59
60
61#ifdef __KERNEL__
62
63/* 60/*
64 * ffs: Find first bit set in word. This is defined the same way as 61 * ffs: Find first bit set in word. This is defined the same way as
65 * the libc and compiler builtin ffs routines, therefore 62 * the libc and compiler builtin ffs routines, therefore
@@ -97,11 +94,15 @@ static inline int fls (unsigned int x)
97#include <asm-generic/bitops/ext2-non-atomic.h> 94#include <asm-generic/bitops/ext2-non-atomic.h>
98 95
99#ifdef __XTENSA_EL__ 96#ifdef __XTENSA_EL__
100# define ext2_set_bit_atomic(lock,nr,addr) test_and_set_bit((nr),(addr)) 97# define ext2_set_bit_atomic(lock,nr,addr) \
101# define ext2_clear_bit_atomic(lock,nr,addr) test_and_clear_bit((nr),(addr)) 98 test_and_set_bit((nr), (unsigned long*)(addr))
99# define ext2_clear_bit_atomic(lock,nr,addr) \
100 test_and_clear_bit((nr), (unsigned long*)(addr))
102#elif defined(__XTENSA_EB__) 101#elif defined(__XTENSA_EB__)
103# define ext2_set_bit_atomic(lock,nr,addr) test_and_set_bit((nr) ^ 0x18, (addr)) 102# define ext2_set_bit_atomic(lock,nr,addr) \
104# define ext2_clear_bit_atomic(lock,nr,addr) test_and_clear_bit((nr)^0x18,(addr)) 103 test_and_set_bit((nr) ^ 0x18, (unsigned long*)(addr))
104# define ext2_clear_bit_atomic(lock,nr,addr) \
105 test_and_clear_bit((nr) ^ 0x18, (unsigned long*)(addr))
105#else 106#else
106# error processor byte order undefined! 107# error processor byte order undefined!
107#endif 108#endif