]> xenbits.xensource.com Git - xen.git/commitdiff
xen/arm: bitops: Consolidate prototypes in one place
authorJulien Grall <julien.grall@arm.com>
Mon, 29 Apr 2019 14:05:20 +0000 (15:05 +0100)
committerJulien Grall <julien.grall@arm.com>
Fri, 14 Jun 2019 13:49:19 +0000 (14:49 +0100)
The prototype are the same between arm32 and arm64. Consolidate them in
asm-arm/bitops.h.

This change will help the introductions of new helpers in a follow-up
patch.

This is part of XSA-295.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/include/asm-arm/arm32/bitops.h
xen/include/asm-arm/arm64/bitops.h
xen/include/asm-arm/bitops.h

index 67c4c3f55cc7a0d74cc96560c29819dc29c066c1..57938a5874eeab5f254278f383695c0908af00f5 100644 (file)
@@ -1,13 +1,6 @@
 #ifndef _ARM_ARM32_BITOPS_H
 #define _ARM_ARM32_BITOPS_H
 
-extern void set_bit(int nr, volatile void * p);
-extern void clear_bit(int nr, volatile void * p);
-extern void change_bit(int nr, volatile void * p);
-extern int test_and_set_bit(int nr, volatile void * p);
-extern int test_and_clear_bit(int nr, volatile void * p);
-extern int test_and_change_bit(int nr, volatile void * p);
-
 #define flsl fls
 
 /*
index 6bf1922680fcb5c74aae6010827e27e3d5908bb2..6cc224ad13c0f80b8735dfaf391b2d2f8a66341d 100644 (file)
@@ -1,16 +1,6 @@
 #ifndef _ARM_ARM64_BITOPS_H
 #define _ARM_ARM64_BITOPS_H
 
-/*
- * Little endian assembly atomic bitops.
- */
-extern void set_bit(int nr, volatile void *p);
-extern void clear_bit(int nr, volatile void *p);
-extern void change_bit(int nr, volatile void *p);
-extern int test_and_set_bit(int nr, volatile void *p);
-extern int test_and_clear_bit(int nr, volatile void *p);
-extern int test_and_change_bit(int nr, volatile void *p);
-
 /* Based on linux/include/asm-generic/bitops/builtin-__ffs.h */
 /**
  * __ffs - find first bit in word.
index bda889841b89e6b2989335f659659b543e1e1a1c..8e864b445660368b1734929490961e3d6a22ffbb 100644 (file)
 # error "unknown ARM variant"
 #endif
 
+/* Atomics bitops */
+void set_bit(int nr, volatile void *p);
+void clear_bit(int nr, volatile void *p);
+void change_bit(int nr, volatile void *p);
+int test_and_set_bit(int nr, volatile void *p);
+int test_and_clear_bit(int nr, volatile void *p);
+int test_and_change_bit(int nr, volatile void *p);
+
 /**
  * __test_and_set_bit - Set a bit and return its old value
  * @nr: Bit to set