Le 02/09/2026 à 13:43, Andrew Cooper a écrit :
All this does is obfuscate the usage sites.

No functional change.

Signed-off-by: Andrew Cooper <[email protected]>
---
CC: Jan Beulich <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Teddy Astie <[email protected]>
CC: Stefano Stabellini <[email protected]>
CC: Julien Grall <[email protected]>
CC: Bertrand Marquis <[email protected]>
CC: Michal Orzel <[email protected]>
CC: Volodymyr Babchuk <[email protected]>
---
  xen/arch/x86/include/asm/bitops.h | 5 +++--
  1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/include/asm/bitops.h 
b/xen/arch/x86/include/asm/bitops.h
index 69ffed510c0a..fbcab32fd239 100644
--- a/xen/arch/x86/include/asm/bitops.h
+++ b/xen/arch/x86/include/asm/bitops.h
@@ -18,7 +18,6 @@
   */
#define ADDR (*(volatile int *) addr)
-#define CONST_ADDR (*(const volatile int *) addr)
/**
   * set_bit - Atomically set a bit in memory
@@ -285,7 +284,9 @@ static inline int variable_test_bit(int nr, const volatile 
void *addr)
      asm volatile ( "btl %[nr], %[addr]\n\t"
                     ASM_FLAG_OUT(, "sbbl %[old], %[old]\n\t")
                     : [old] ASM_FLAG_OUT("=@ccc", "=r") (oldbit)
-                   : [addr] "m" (CONST_ADDR), [nr] "Ir" (nr) : "memory" );
+                   : [addr] "m" (*(const volatile int *)addr),
+                    [nr] "Ir" (nr)
+                  : "memory" );
return oldbit;
  }

Reviewed-by: Teddy Astie <[email protected]>

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to