File 5d03a0c4-5-Arm-bitops-consolidate-prototypes.patch of Package xen

# Commit 3a4e55e6051bb10f9debc4fb874c31081b24930b
# Date 2019-06-14 14:27:32 +0100
# Author Julien Grall <julien.grall@arm.com>
# Committer Julien Grall <julien.grall@arm.com>
xen/arm: bitops: Consolidate prototypes in one place

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>

--- a/xen/include/asm-arm/arm32/bitops.h
+++ b/xen/include/asm-arm/arm32/bitops.h
@@ -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
 
 /*
--- a/xen/include/asm-arm/arm64/bitops.h
+++ b/xen/include/asm-arm/arm64/bitops.h
@@ -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.
--- a/xen/include/asm-arm/bitops.h
+++ b/xen/include/asm-arm/bitops.h
@@ -38,6 +38,14 @@
 # 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
openSUSE Build Service is sponsored by