33 lines
1.1 KiB
Diff
33 lines
1.1 KiB
Diff
From c3a7d9468d5623c0164b783346bada8664a9a2c9 Mon Sep 17 00:00:00 2001
|
|
From: Brendan Cunningham <14318587+BrendanCunningham@users.noreply.github.com>
|
|
Date: Sat, 20 Nov 2021 13:02:06 -0500
|
|
Subject: [PATCH] ips_cmpxchg: remove compile-breaking bad cast-to-struct.
|
|
|
|
uint32_t ptr argument in compare-and-swap code snippet should not be
|
|
cast to pointer-to-uint32_t[100] struct.
|
|
|
|
Signed-off-by: Brendan Cunningham <bcunningham@cornelisnetworks.com>
|
|
---
|
|
include/linux-i386/sysdep.h | 5 +----
|
|
rpm_release_extension | 2 +-
|
|
2 files changed, 2 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/include/linux-i386/sysdep.h b/include/linux-i386/sysdep.h
|
|
index bfd5746..2c48c1e 100644
|
|
--- a/include/linux-i386/sysdep.h
|
|
+++ b/include/linux-i386/sysdep.h
|
|
@@ -139,12 +139,9 @@ static __inline__ uint32_t ips_cmpxchg(volatile uint32_t *ptr,
|
|
uint32_t old_val, uint32_t new_val)
|
|
{
|
|
uint32_t prev;
|
|
- struct xchg_dummy {
|
|
- uint32_t a[100];
|
|
- };
|
|
|
|
asm volatile (LOCK_PREFIX "cmpxchgl %1,%2" : "=a"(prev)
|
|
- : "q"(new_val), "m"(*(struct xchg_dummy *)ptr), "0"(old_val)
|
|
+ : "q"(new_val), "m"(*ptr), "0"(old_val)
|
|
: "memory");
|
|
|
|
return prev;
|