aboutsummaryrefslogtreecommitdiffstats
path: root/arch/loongarch/include/asm/percpu.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-09-12 16:51:22 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-09-12 16:51:22 +0200
commita791dc135325862fdf491ac088f54993710e2515 (patch)
tree3fe941c0d8b8d315ad4b2235836462e0820f98ae /arch/loongarch/include/asm/percpu.h
parentdriver core: remove make_class_name declaration (diff)
parentLinux 6.0-rc5 (diff)
downloadlinux-dev-a791dc135325862fdf491ac088f54993710e2515.tar.xz
linux-dev-a791dc135325862fdf491ac088f54993710e2515.zip
Merge 6.0-rc5 into driver-core-next
We need the driver core and debugfs changes in this branch. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/loongarch/include/asm/percpu.h')
-rw-r--r--arch/loongarch/include/asm/percpu.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/loongarch/include/asm/percpu.h b/arch/loongarch/include/asm/percpu.h
index e6569f18c6dd..0bd6b0110198 100644
--- a/arch/loongarch/include/asm/percpu.h
+++ b/arch/loongarch/include/asm/percpu.h
@@ -123,6 +123,10 @@ static inline unsigned long __percpu_xchg(void *ptr, unsigned long val,
int size)
{
switch (size) {
+ case 1:
+ case 2:
+ return __xchg_small((volatile void *)ptr, val, size);
+
case 4:
return __xchg_asm("amswap.w", (volatile u32 *)ptr, (u32)val);
@@ -204,9 +208,13 @@ do { \
#define this_cpu_write_4(pcp, val) _percpu_write(pcp, val)
#define this_cpu_write_8(pcp, val) _percpu_write(pcp, val)
+#define this_cpu_xchg_1(pcp, val) _percpu_xchg(pcp, val)
+#define this_cpu_xchg_2(pcp, val) _percpu_xchg(pcp, val)
#define this_cpu_xchg_4(pcp, val) _percpu_xchg(pcp, val)
#define this_cpu_xchg_8(pcp, val) _percpu_xchg(pcp, val)
+#define this_cpu_cmpxchg_1(ptr, o, n) _protect_cmpxchg_local(ptr, o, n)
+#define this_cpu_cmpxchg_2(ptr, o, n) _protect_cmpxchg_local(ptr, o, n)
#define this_cpu_cmpxchg_4(ptr, o, n) _protect_cmpxchg_local(ptr, o, n)
#define this_cpu_cmpxchg_8(ptr, o, n) _protect_cmpxchg_local(ptr, o, n)