From 4b52b4f64809960ae354da8dc826b1052c85161d Mon Sep 17 00:00:00 2001 From: starlet-dx <15929766099@163.com> Date: Fri, 14 Jul 2023 11:25:49 +0800 Subject: [PATCH 1/1] ips_cmpxchg: remove compile-breaking bad cast-to-struct. Origin: https://github.com/cornelisnetworks/opa-psm2/commit/c3a7d9468d5623c0164b783346bada8664a9a2c9 --- include/linux-i386/sysdep.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/linux-i386/sysdep.h b/include/linux-i386/sysdep.h index ef99d1d..8c5c1b2 100644 --- a/include/linux-i386/sysdep.h +++ b/include/linux-i386/sysdep.h @@ -104,11 +104,10 @@ static __inline__ uint32_t ips_cmpxchg(volatile uint32_t *ptr, uint32_t old, uint32_t new) { uint32_t prev; - struct xchg_dummy { uint32_t a[100]; }; asm volatile(LOCK_PREFIX "cmpxchgl %1,%2" : "=a"(prev) - : "q"(new), "m"(*(struct xchg_dummy *)ptr), "0"(old) + : "q"(new), "m"(*ptr), "0"(old) : "memory"); return prev; -- 2.39.1