Skip to content

Commit 24e700e

Browse files
committed
Merge branch 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 apic updates from Thomas Gleixner: "This update provides: - Cleanup of the IDT management including the removal of the extra tracing IDT. A first step to cleanup the vector management code. - The removal of the paravirt op adjust_exception_frame. This is a XEN specific issue, but merged through this branch to avoid nasty merge collisions - Prevent dmesg spam about the TSC DEADLINE bug, when the CPU has disabled the TSC DEADLINE timer in CPUID. - Adjust a debug message in the ioapic code to print out the information correctly" * 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (51 commits) x86/idt: Fix the X86_TRAP_BP gate x86/xen: Get rid of paravirt op adjust_exception_frame x86/eisa: Add missing include x86/idt: Remove superfluous ALIGNment x86/apic: Silence "FW_BUG TSC_DEADLINE disabled due to Errata" on CPUs without the feature x86/idt: Remove the tracing IDT leftovers x86/idt: Hide set_intr_gate() x86/idt: Simplify alloc_intr_gate() x86/idt: Deinline setup functions x86/idt: Remove unused functions/inlines x86/idt: Move interrupt gate initialization to IDT code x86/idt: Move APIC gate initialization to tables x86/idt: Move regular trap init to tables x86/idt: Move IST stack based traps to table init x86/idt: Move debug stack init to table based x86/idt: Switch early trap init to IDT tables x86/idt: Prepare for table based init x86/idt: Move early IDT setup out of 32-bit asm x86/idt: Move early IDT handler setup to IDT code x86/idt: Consolidate IDT invalidation ...
2 parents f570917 + c6ef894 commit 24e700e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+901
-1077
lines changed

arch/x86/boot/compressed/eboot.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1058,7 +1058,7 @@ struct boot_params *efi_main(struct efi_config *c,
10581058
desc->s = DESC_TYPE_CODE_DATA;
10591059
desc->dpl = 0;
10601060
desc->p = 1;
1061-
desc->limit = 0xf;
1061+
desc->limit1 = 0xf;
10621062
desc->avl = 0;
10631063
desc->l = 0;
10641064
desc->d = SEG_OP_SIZE_32BIT;
@@ -1078,7 +1078,7 @@ struct boot_params *efi_main(struct efi_config *c,
10781078
desc->s = DESC_TYPE_CODE_DATA;
10791079
desc->dpl = 0;
10801080
desc->p = 1;
1081-
desc->limit = 0xf;
1081+
desc->limit1 = 0xf;
10821082
desc->avl = 0;
10831083
if (IS_ENABLED(CONFIG_X86_64)) {
10841084
desc->l = 1;
@@ -1099,7 +1099,7 @@ struct boot_params *efi_main(struct efi_config *c,
10991099
desc->s = DESC_TYPE_CODE_DATA;
11001100
desc->dpl = 0;
11011101
desc->p = 1;
1102-
desc->limit = 0xf;
1102+
desc->limit1 = 0xf;
11031103
desc->avl = 0;
11041104
desc->l = 0;
11051105
desc->d = SEG_OP_SIZE_32BIT;
@@ -1116,7 +1116,7 @@ struct boot_params *efi_main(struct efi_config *c,
11161116
desc->s = 0;
11171117
desc->dpl = 0;
11181118
desc->p = 1;
1119-
desc->limit = 0x0;
1119+
desc->limit1 = 0x0;
11201120
desc->avl = 0;
11211121
desc->l = 0;
11221122
desc->d = 0;

arch/x86/entry/entry_32.S

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -673,16 +673,8 @@ ENTRY(name) \
673673
jmp ret_from_intr; \
674674
ENDPROC(name)
675675

676-
677-
#ifdef CONFIG_TRACING
678-
# define TRACE_BUILD_INTERRUPT(name, nr) BUILD_INTERRUPT3(trace_##name, nr, smp_trace_##name)
679-
#else
680-
# define TRACE_BUILD_INTERRUPT(name, nr)
681-
#endif
682-
683676
#define BUILD_INTERRUPT(name, nr) \
684677
BUILD_INTERRUPT3(name, nr, smp_##name); \
685-
TRACE_BUILD_INTERRUPT(name, nr)
686678

687679
/* The include is where all of the SMP etc. interrupts come from */
688680
#include <asm/entry_arch.h>
@@ -880,25 +872,17 @@ ENTRY(xen_failsafe_callback)
880872
ENDPROC(xen_failsafe_callback)
881873

882874
BUILD_INTERRUPT3(xen_hvm_callback_vector, HYPERVISOR_CALLBACK_VECTOR,
883-
xen_evtchn_do_upcall)
875+
xen_evtchn_do_upcall)
884876

885877
#endif /* CONFIG_XEN */
886878

887879
#if IS_ENABLED(CONFIG_HYPERV)
888880

889881
BUILD_INTERRUPT3(hyperv_callback_vector, HYPERVISOR_CALLBACK_VECTOR,
890-
hyperv_vector_handler)
882+
hyperv_vector_handler)
891883

892884
#endif /* CONFIG_HYPERV */
893885

894-
#ifdef CONFIG_TRACING
895-
ENTRY(trace_page_fault)
896-
ASM_CLAC
897-
pushl $trace_do_page_fault
898-
jmp common_exception
899-
END(trace_page_fault)
900-
#endif
901-
902886
ENTRY(page_fault)
903887
ASM_CLAC
904888
pushl $do_page_fault

arch/x86/entry/entry_64.S

Lines changed: 5 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -748,26 +748,13 @@ ENTRY(\sym)
748748
END(\sym)
749749
.endm
750750

751-
#ifdef CONFIG_TRACING
752-
#define trace(sym) trace_##sym
753-
#define smp_trace(sym) smp_trace_##sym
754-
755-
.macro trace_apicinterrupt num sym
756-
apicinterrupt3 \num trace(\sym) smp_trace(\sym)
757-
.endm
758-
#else
759-
.macro trace_apicinterrupt num sym do_sym
760-
.endm
761-
#endif
762-
763751
/* Make sure APIC interrupt handlers end up in the irqentry section: */
764752
#define PUSH_SECTION_IRQENTRY .pushsection .irqentry.text, "ax"
765753
#define POP_SECTION_IRQENTRY .popsection
766754

767755
.macro apicinterrupt num sym do_sym
768756
PUSH_SECTION_IRQENTRY
769757
apicinterrupt3 \num \sym \do_sym
770-
trace_apicinterrupt \num \sym
771758
POP_SECTION_IRQENTRY
772759
.endm
773760

@@ -829,7 +816,6 @@ ENTRY(\sym)
829816
.endif
830817

831818
ASM_CLAC
832-
PARAVIRT_ADJUST_EXCEPTION_FRAME
833819

834820
.ifeq \has_error_code
835821
pushq $-1 /* ORIG_RAX: no syscall to restart */
@@ -913,17 +899,6 @@ ENTRY(\sym)
913899
END(\sym)
914900
.endm
915901

916-
#ifdef CONFIG_TRACING
917-
.macro trace_idtentry sym do_sym has_error_code:req
918-
idtentry trace(\sym) trace(\do_sym) has_error_code=\has_error_code
919-
idtentry \sym \do_sym has_error_code=\has_error_code
920-
.endm
921-
#else
922-
.macro trace_idtentry sym do_sym has_error_code:req
923-
idtentry \sym \do_sym has_error_code=\has_error_code
924-
.endm
925-
#endif
926-
927902
idtentry divide_error do_divide_error has_error_code=0
928903
idtentry overflow do_overflow has_error_code=0
929904
idtentry bounds do_bounds has_error_code=0
@@ -986,7 +961,7 @@ ENTRY(do_softirq_own_stack)
986961
ENDPROC(do_softirq_own_stack)
987962

988963
#ifdef CONFIG_XEN
989-
idtentry xen_hypervisor_callback xen_do_hypervisor_callback has_error_code=0
964+
idtentry hypervisor_callback xen_do_hypervisor_callback has_error_code=0
990965

991966
/*
992967
* A note on the "critical region" in our callback handler.
@@ -1053,8 +1028,6 @@ ENTRY(xen_failsafe_callback)
10531028
movq 8(%rsp), %r11
10541029
addq $0x30, %rsp
10551030
pushq $0 /* RIP */
1056-
pushq %r11
1057-
pushq %rcx
10581031
UNWIND_HINT_IRET_REGS offset=8
10591032
jmp general_protection
10601033
1: /* Segment mismatch => Category 1 (Bad segment). Retry the IRET. */
@@ -1085,13 +1058,12 @@ idtentry int3 do_int3 has_error_code=0 paranoid=1 shift_ist=DEBUG_STACK
10851058
idtentry stack_segment do_stack_segment has_error_code=1
10861059

10871060
#ifdef CONFIG_XEN
1088-
idtentry xen_debug do_debug has_error_code=0
1089-
idtentry xen_int3 do_int3 has_error_code=0
1090-
idtentry xen_stack_segment do_stack_segment has_error_code=1
1061+
idtentry xendebug do_debug has_error_code=0
1062+
idtentry xenint3 do_int3 has_error_code=0
10911063
#endif
10921064

10931065
idtentry general_protection do_general_protection has_error_code=1
1094-
trace_idtentry page_fault do_page_fault has_error_code=1
1066+
idtentry page_fault do_page_fault has_error_code=1
10951067

10961068
#ifdef CONFIG_KVM_GUEST
10971069
idtentry async_page_fault do_async_page_fault has_error_code=1
@@ -1251,20 +1223,9 @@ ENTRY(error_exit)
12511223
END(error_exit)
12521224

12531225
/* Runs on exception stack */
1226+
/* XXX: broken on Xen PV */
12541227
ENTRY(nmi)
12551228
UNWIND_HINT_IRET_REGS
1256-
/*
1257-
* Fix up the exception frame if we're on Xen.
1258-
* PARAVIRT_ADJUST_EXCEPTION_FRAME is guaranteed to push at most
1259-
* one value to the stack on native, so it may clobber the rdx
1260-
* scratch slot, but it won't clobber any of the important
1261-
* slots past it.
1262-
*
1263-
* Xen is a different story, because the Xen frame itself overlaps
1264-
* the "NMI executing" variable.
1265-
*/
1266-
PARAVIRT_ADJUST_EXCEPTION_FRAME
1267-
12681229
/*
12691230
* We allow breakpoints in NMIs. If a breakpoint occurs, then
12701231
* the iretq it performs will take us out of NMI context.

arch/x86/entry/entry_64_compat.S

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,6 @@ ENTRY(entry_INT80_compat)
293293
/*
294294
* Interrupts are off on entry.
295295
*/
296-
PARAVIRT_ADJUST_EXCEPTION_FRAME
297296
ASM_CLAC /* Do this early to minimize exposure */
298297
SWAPGS
299298

arch/x86/entry/vdso/vma.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ static void vgetcpu_cpu_init(void *arg)
351351
* and 8 bits for the node)
352352
*/
353353
d.limit0 = cpu | ((node & 0xf) << 12);
354-
d.limit = node >> 4;
354+
d.limit1 = node >> 4;
355355
d.type = 5; /* RO data, expand down, accessed */
356356
d.dpl = 3; /* Visible to user code */
357357
d.s = 1; /* Not a system segment */

0 commit comments

Comments
 (0)