From a2812e178321132811a53f7be40fe7e9bbffd9e0 Mon Sep 17 00:00:00 2001 From: Akinobu Mita Date: Thu, 26 May 2011 16:26:06 -0700 Subject: arch: add #define for each of optimized find bitops The style that we normally use in asm-generic is to test the macro itself for existence, so in asm-generic, do: #ifndef find_next_zero_bit_le extern unsigned long find_next_zero_bit_le(const void *addr, unsigned long size, unsigned long offset); #endif and in the architectures, write static inline unsigned long find_next_zero_bit_le(const void *addr, unsigned long size, unsigned long offset) #define find_next_zero_bit_le find_next_zero_bit_le This adds the #define for each of the optimized find bitops in the architectures. Suggested-by: Arnd Bergmann Signed-off-by: Akinobu Mita Acked-by: Hans-Christian Egtvedt Acked-by: Russell King Acked-by: Greg Ungerer Cc: Martin Schwidefsky Cc: Heiko Carstens Acked-by: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/avr32/include/asm/bitops.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'arch/avr32') diff --git a/arch/avr32/include/asm/bitops.h b/arch/avr32/include/asm/bitops.h index 72444d97f80..b70c19bab63 100644 --- a/arch/avr32/include/asm/bitops.h +++ b/arch/avr32/include/asm/bitops.h @@ -270,14 +270,21 @@ static inline int __fls(unsigned long word) unsigned long find_first_zero_bit(const unsigned long *addr, unsigned long size); +#define find_first_zero_bit find_first_zero_bit + unsigned long find_next_zero_bit(const unsigned long *addr, unsigned long size, unsigned long offset); +#define find_next_zero_bit find_next_zero_bit + unsigned long find_first_bit(const unsigned long *addr, unsigned long size); +#define find_first_bit find_first_bit + unsigned long find_next_bit(const unsigned long *addr, unsigned long size, unsigned long offset); +#define find_next_bit find_next_bit /* * ffs: find first bit set. This is defined the same way as @@ -299,6 +306,14 @@ static inline int ffs(unsigned long word) #include #include +extern unsigned long find_next_zero_bit_le(const void *addr, + unsigned long size, unsigned long offset); +#define find_next_zero_bit_le find_next_zero_bit_le + +extern unsigned long find_next_bit_le(const void *addr, + unsigned long size, unsigned long offset); +#define find_next_bit_le find_next_bit_le + #include #include -- cgit v1.2.3