aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/include/asm/percpu.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/include/asm/percpu.h')
-rw-r--r--arch/s390/include/asm/percpu.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/s390/include/asm/percpu.h b/arch/s390/include/asm/percpu.h
index 6537e72e0853..7adebfc0c6dc 100644
--- a/arch/s390/include/asm/percpu.h
+++ b/arch/s390/include/asm/percpu.h
@@ -84,6 +84,24 @@ do { \
84#define this_cpu_cmpxchg_4(pcp, oval, nval) arch_this_cpu_cmpxchg(pcp, oval, nval) 84#define this_cpu_cmpxchg_4(pcp, oval, nval) arch_this_cpu_cmpxchg(pcp, oval, nval)
85#define this_cpu_cmpxchg_8(pcp, oval, nval) arch_this_cpu_cmpxchg(pcp, oval, nval) 85#define this_cpu_cmpxchg_8(pcp, oval, nval) arch_this_cpu_cmpxchg(pcp, oval, nval)
86 86
87#define arch_this_cpu_xchg(pcp, nval) \
88({ \
89 typeof(pcp) *ptr__; \
90 typeof(pcp) ret__; \
91 preempt_disable(); \
92 ptr__ = __this_cpu_ptr(&(pcp)); \
93 ret__ = xchg(ptr__, nval); \
94 preempt_enable(); \
95 ret__; \
96})
97
98#define this_cpu_xchg_1(pcp, nval) arch_this_cpu_xchg(pcp, nval)
99#define this_cpu_xchg_2(pcp, nval) arch_this_cpu_xchg(pcp, nval)
100#define this_cpu_xchg_4(pcp, nval) arch_this_cpu_xchg(pcp, nval)
101#ifdef CONFIG_64BIT
102#define this_cpu_xchg_8(pcp, nval) arch_this_cpu_xchg(pcp, nval)
103#endif
104
87#include <asm-generic/percpu.h> 105#include <asm-generic/percpu.h>
88 106
89#endif /* __ARCH_S390_PERCPU__ */ 107#endif /* __ARCH_S390_PERCPU__ */