about summary refs log tree commit diff
path: root/arch/arm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/atomic_arch.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/atomic_arch.h b/arch/arm/atomic_arch.h
index d6af84d0..a121010f 100644
--- a/arch/arm/atomic_arch.h
+++ b/arch/arm/atomic_arch.h
@@ -81,3 +81,10 @@ static inline void a_crash()
 #endif
 		: : : "memory");
 }
+
+#define a_clz_32 a_clz_32
+static inline int a_clz_32(uint32_t x)
+{
+	__asm__ ("clz %0, %1" : "=r"(x) : "r"(x));
+	return x;
+}