Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

percpu: Fixup __this_cpu_xchg* operations

Somehow we got into a situation where the __this_cpu_xchg() operations were
not defined in the same way as this_cpu_xchg() and friends. I had some build
failures under 32 bit that were addressed by these fixes.

Signed-off-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Tejun Heo <tj@kernel.org>

authored by

Christoph Lameter and committed by
Tejun Heo
688d3be8 620917de

+5 -6
+5 -6
arch/x86/include/asm/percpu.h
··· 388 388 #define __this_cpu_xor_1(pcp, val) percpu_to_op("xor", (pcp), val) 389 389 #define __this_cpu_xor_2(pcp, val) percpu_to_op("xor", (pcp), val) 390 390 #define __this_cpu_xor_4(pcp, val) percpu_to_op("xor", (pcp), val) 391 - /* 392 - * Generic fallback operations for __this_cpu_xchg_[1-4] are okay and much 393 - * faster than an xchg with forced lock semantics. 394 - */ 395 - #define __this_cpu_xchg_8(pcp, nval) percpu_xchg_op(pcp, nval) 396 - #define __this_cpu_cmpxchg_8(pcp, oval, nval) percpu_cmpxchg_op(pcp, oval, nval) 391 + #define __this_cpu_xchg_1(pcp, val) percpu_xchg_op(pcp, val) 392 + #define __this_cpu_xchg_2(pcp, val) percpu_xchg_op(pcp, val) 393 + #define __this_cpu_xchg_4(pcp, val) percpu_xchg_op(pcp, val) 397 394 398 395 #define this_cpu_read_1(pcp) percpu_from_op("mov", (pcp), "m"(pcp)) 399 396 #define this_cpu_read_2(pcp) percpu_from_op("mov", (pcp), "m"(pcp)) ··· 482 485 #define __this_cpu_or_8(pcp, val) percpu_to_op("or", (pcp), val) 483 486 #define __this_cpu_xor_8(pcp, val) percpu_to_op("xor", (pcp), val) 484 487 #define __this_cpu_add_return_8(pcp, val) percpu_add_return_op(pcp, val) 488 + #define __this_cpu_xchg_8(pcp, nval) percpu_xchg_op(pcp, nval) 489 + #define __this_cpu_cmpxchg_8(pcp, oval, nval) percpu_cmpxchg_op(pcp, oval, nval) 485 490 486 491 #define this_cpu_read_8(pcp) percpu_from_op("mov", (pcp), "m"(pcp)) 487 492 #define this_cpu_write_8(pcp, val) percpu_to_op("mov", (pcp), val)