]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/arm/include/asm/bitops.h
ARM: Implement non-cached memory support
[karo-tx-uboot.git] / arch / arm / include / asm / bitops.h
index 270f163eee3fb5ebe190cec4352c19901361eba9..597dafbf9d26fadcb27dce69cf03df2dd08ca44b 100644 (file)
@@ -17,7 +17,7 @@
 
 #ifdef __KERNEL__
 
-#include <asm/proc/system.h>
+#include <asm/proc-armv/system.h>
 
 #define smp_mb__before_clear_bit()     do { } while (0)
 #define smp_mb__after_clear_bit()      do { } while (0)
@@ -106,6 +106,11 @@ static inline int test_bit(int nr, const void * addr)
     return ((unsigned char *) addr)[nr >> 3] & (1U << (nr & 7));
 }
 
+static inline int __ilog2(unsigned int x)
+{
+       return generic_fls(x) - 1;
+}
+
 /*
  * ffz = Find First Zero in word. Undefined if no zero exists,
  * so code should check against ~0UL first..