lkml.org 
[lkml]   [2023]   [Jan]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [RFC][PATCH 07/12] percpu: Wire up cmpxchg128
On Mon, Dec 19, 2022 at 04:35:32PM +0100, Peter Zijlstra wrote:
> In order to replace cmpxchg_double() with the newly minted
> cmpxchg128() family of functions, wire it up in this_cpu_cmpxchg().
>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
...
> --- a/arch/s390/include/asm/percpu.h
> +++ b/arch/s390/include/asm/percpu.h
> +#define this_cpu_cmpxchg_16(pcp, oval, nval) \
> +({ \
> + u128 old__ = __pcpu_cast_128((nval), (nval)); \
> + u128 new__ = __pcpu_cast_128((oval), (oval)); \

spot the bug... please merge the below into this patch.

diff --git a/arch/s390/include/asm/percpu.h b/arch/s390/include/asm/percpu.h
index 24a4d9d644c0..d1997d01892a 100644
--- a/arch/s390/include/asm/percpu.h
+++ b/arch/s390/include/asm/percpu.h
@@ -156,8 +156,8 @@

#define this_cpu_cmpxchg_16(pcp, oval, nval) \
({ \
- u128 old__ = __pcpu_cast_128((nval), (nval)); \
- u128 new__ = __pcpu_cast_128((oval), (oval)); \
+ u128 old__ = __pcpu_cast_128((oval), (oval)); \
+ u128 new__ = __pcpu_cast_128((nval), (nval)); \
typedef typeof(pcp) pcp_op_T__; \
pcp_op_T__ *ptr__; \
u128 ret__; \
\
 
 \ /
  Last update: 2023-03-26 23:27    [W:0.643 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site