提交 527838d4 编写于 作者: L Linus Torvalds

Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Ingo Molnar:
 "Misc fixes:

   - a build race fix

   - a Xen entry fix

   - a TSC_DEADLINE quirk future-proofing fix"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/boot: Fix if_changed build flip/flop bug
  x86/entry/64: Remove %ebx handling from error_entry/exit
  x86/apic: Future-proof the TSC_DEADLINE quirk for SKX
...@@ -106,9 +106,13 @@ define cmd_check_data_rel ...@@ -106,9 +106,13 @@ define cmd_check_data_rel
done done
endef endef
# We need to run two commands under "if_changed", so merge them into a
# single invocation.
quiet_cmd_check-and-link-vmlinux = LD $@
cmd_check-and-link-vmlinux = $(cmd_check_data_rel); $(cmd_ld)
$(obj)/vmlinux: $(vmlinux-objs-y) FORCE $(obj)/vmlinux: $(vmlinux-objs-y) FORCE
$(call if_changed,check_data_rel) $(call if_changed,check-and-link-vmlinux)
$(call if_changed,ld)
OBJCOPYFLAGS_vmlinux.bin := -R .comment -S OBJCOPYFLAGS_vmlinux.bin := -R .comment -S
$(obj)/vmlinux.bin: vmlinux FORCE $(obj)/vmlinux.bin: vmlinux FORCE
......
...@@ -981,7 +981,7 @@ ENTRY(\sym) ...@@ -981,7 +981,7 @@ ENTRY(\sym)
call \do_sym call \do_sym
jmp error_exit /* %ebx: no swapgs flag */ jmp error_exit
.endif .endif
END(\sym) END(\sym)
.endm .endm
...@@ -1222,7 +1222,6 @@ END(paranoid_exit) ...@@ -1222,7 +1222,6 @@ END(paranoid_exit)
/* /*
* Save all registers in pt_regs, and switch GS if needed. * Save all registers in pt_regs, and switch GS if needed.
* Return: EBX=0: came from user mode; EBX=1: otherwise
*/ */
ENTRY(error_entry) ENTRY(error_entry)
UNWIND_HINT_FUNC UNWIND_HINT_FUNC
...@@ -1269,7 +1268,6 @@ ENTRY(error_entry) ...@@ -1269,7 +1268,6 @@ ENTRY(error_entry)
* for these here too. * for these here too.
*/ */
.Lerror_kernelspace: .Lerror_kernelspace:
incl %ebx
leaq native_irq_return_iret(%rip), %rcx leaq native_irq_return_iret(%rip), %rcx
cmpq %rcx, RIP+8(%rsp) cmpq %rcx, RIP+8(%rsp)
je .Lerror_bad_iret je .Lerror_bad_iret
...@@ -1303,28 +1301,20 @@ ENTRY(error_entry) ...@@ -1303,28 +1301,20 @@ ENTRY(error_entry)
/* /*
* Pretend that the exception came from user mode: set up pt_regs * Pretend that the exception came from user mode: set up pt_regs
* as if we faulted immediately after IRET and clear EBX so that * as if we faulted immediately after IRET.
* error_exit knows that we will be returning to user mode.
*/ */
mov %rsp, %rdi mov %rsp, %rdi
call fixup_bad_iret call fixup_bad_iret
mov %rax, %rsp mov %rax, %rsp
decl %ebx
jmp .Lerror_entry_from_usermode_after_swapgs jmp .Lerror_entry_from_usermode_after_swapgs
END(error_entry) END(error_entry)
/*
* On entry, EBX is a "return to kernel mode" flag:
* 1: already in kernel mode, don't need SWAPGS
* 0: user gsbase is loaded, we need SWAPGS and standard preparation for return to usermode
*/
ENTRY(error_exit) ENTRY(error_exit)
UNWIND_HINT_REGS UNWIND_HINT_REGS
DISABLE_INTERRUPTS(CLBR_ANY) DISABLE_INTERRUPTS(CLBR_ANY)
TRACE_IRQS_OFF TRACE_IRQS_OFF
testl %ebx, %ebx testb $3, CS(%rsp)
jnz retint_kernel jz retint_kernel
jmp retint_user jmp retint_user
END(error_exit) END(error_exit)
......
...@@ -573,6 +573,9 @@ static u32 skx_deadline_rev(void) ...@@ -573,6 +573,9 @@ static u32 skx_deadline_rev(void)
case 0x04: return 0x02000014; case 0x04: return 0x02000014;
} }
if (boot_cpu_data.x86_stepping > 4)
return 0;
return ~0U; return ~0U;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册