diff options
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/include/asm/percpu.h | 7 | ||||
-rw-r--r-- | arch/x86/kernel/vmlinux.lds.S | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/arch/x86/include/asm/percpu.h b/arch/x86/include/asm/percpu.h index 53278b0dfdf6..a0a9779084d1 100644 --- a/arch/x86/include/asm/percpu.h +++ b/arch/x86/include/asm/percpu.h | |||
@@ -509,6 +509,11 @@ do { \ | |||
509 | * it in software. The address used in the cmpxchg16 instruction must be | 509 | * it in software. The address used in the cmpxchg16 instruction must be |
510 | * aligned to a 16 byte boundary. | 510 | * aligned to a 16 byte boundary. |
511 | */ | 511 | */ |
512 | #ifdef CONFIG_SMP | ||
513 | #define CMPXCHG16B_EMU_CALL "call this_cpu_cmpxchg16b_emu\n\t" ASM_NOP3 | ||
514 | #else | ||
515 | #define CMPXCHG16B_EMU_CALL "call this_cpu_cmpxchg16b_emu\n\t" ASM_NOP2 | ||
516 | #endif | ||
512 | #define percpu_cmpxchg16b_double(pcp1, o1, o2, n1, n2) \ | 517 | #define percpu_cmpxchg16b_double(pcp1, o1, o2, n1, n2) \ |
513 | ({ \ | 518 | ({ \ |
514 | char __ret; \ | 519 | char __ret; \ |
@@ -517,7 +522,7 @@ do { \ | |||
517 | typeof(o2) __o2 = o2; \ | 522 | typeof(o2) __o2 = o2; \ |
518 | typeof(o2) __n2 = n2; \ | 523 | typeof(o2) __n2 = n2; \ |
519 | typeof(o2) __dummy; \ | 524 | typeof(o2) __dummy; \ |
520 | alternative_io("call this_cpu_cmpxchg16b_emu\n\t" ASM_NOP4, \ | 525 | alternative_io(CMPXCHG16B_EMU_CALL, \ |
521 | "cmpxchg16b " __percpu_prefix "(%%rsi)\n\tsetz %0\n\t", \ | 526 | "cmpxchg16b " __percpu_prefix "(%%rsi)\n\tsetz %0\n\t", \ |
522 | X86_FEATURE_CX16, \ | 527 | X86_FEATURE_CX16, \ |
523 | ASM_OUTPUT2("=a"(__ret), "=d"(__dummy)), \ | 528 | ASM_OUTPUT2("=a"(__ret), "=d"(__dummy)), \ |
diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S index 49927a863cc1..61682f0ac264 100644 --- a/arch/x86/kernel/vmlinux.lds.S +++ b/arch/x86/kernel/vmlinux.lds.S | |||
@@ -326,7 +326,7 @@ SECTIONS | |||
326 | } | 326 | } |
327 | 327 | ||
328 | #if !defined(CONFIG_X86_64) || !defined(CONFIG_SMP) | 328 | #if !defined(CONFIG_X86_64) || !defined(CONFIG_SMP) |
329 | PERCPU(INTERNODE_CACHE_BYTES, PAGE_SIZE) | 329 | PERCPU_SECTION(INTERNODE_CACHE_BYTES) |
330 | #endif | 330 | #endif |
331 | 331 | ||
332 | . = ALIGN(PAGE_SIZE); | 332 | . = ALIGN(PAGE_SIZE); |