diff options
-rw-r--r-- | arch/x86/kernel/cpu/common.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 2d5b1fa5f9c6..8bffeae9bac2 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c | |||
@@ -1531,8 +1531,6 @@ EXPORT_PER_CPU_SYMBOL(__preempt_count); | |||
1531 | /* May not be marked __init: used by software suspend */ | 1531 | /* May not be marked __init: used by software suspend */ |
1532 | void syscall_init(void) | 1532 | void syscall_init(void) |
1533 | { | 1533 | { |
1534 | int __maybe_unused cpu = smp_processor_id(); | ||
1535 | |||
1536 | wrmsr(MSR_STAR, 0, (__USER32_CS << 16) | __KERNEL_CS); | 1534 | wrmsr(MSR_STAR, 0, (__USER32_CS << 16) | __KERNEL_CS); |
1537 | wrmsrl(MSR_LSTAR, (unsigned long)entry_SYSCALL_64); | 1535 | wrmsrl(MSR_LSTAR, (unsigned long)entry_SYSCALL_64); |
1538 | 1536 | ||
@@ -1545,7 +1543,8 @@ void syscall_init(void) | |||
1545 | * AMD doesn't allow SYSENTER in long mode (either 32- or 64-bit). | 1543 | * AMD doesn't allow SYSENTER in long mode (either 32- or 64-bit). |
1546 | */ | 1544 | */ |
1547 | wrmsrl_safe(MSR_IA32_SYSENTER_CS, (u64)__KERNEL_CS); | 1545 | wrmsrl_safe(MSR_IA32_SYSENTER_CS, (u64)__KERNEL_CS); |
1548 | wrmsrl_safe(MSR_IA32_SYSENTER_ESP, (unsigned long)(cpu_entry_stack(cpu) + 1)); | 1546 | wrmsrl_safe(MSR_IA32_SYSENTER_ESP, |
1547 | (unsigned long)(cpu_entry_stack(smp_processor_id()) + 1)); | ||
1549 | wrmsrl_safe(MSR_IA32_SYSENTER_EIP, (u64)entry_SYSENTER_compat); | 1548 | wrmsrl_safe(MSR_IA32_SYSENTER_EIP, (u64)entry_SYSENTER_compat); |
1550 | #else | 1549 | #else |
1551 | wrmsrl(MSR_CSTAR, (unsigned long)ignore_sysret); | 1550 | wrmsrl(MSR_CSTAR, (unsigned long)ignore_sysret); |