summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/idt.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2020-05-21 22:05:34 +0200
committerThomas Gleixner <tglx@linutronix.de>2020-06-11 15:15:11 +0200
commit633260fa143bbed05e65dc557a492667dfdc45bb (patch)
tree7a9dfe7624f2df0400408aa401bd80aca41c3f90 /arch/x86/kernel/idt.c
parent79b9c183021ef3f5ca2d5168cd3fd442580eca09 (diff)
downloadlinux-stable-633260fa143bbed05e65dc557a492667dfdc45bb.tar.gz
linux-stable-633260fa143bbed05e65dc557a492667dfdc45bb.tar.bz2
linux-stable-633260fa143bbed05e65dc557a492667dfdc45bb.zip
x86/irq: Convey vector as argument and not in ptregs
Device interrupts which go through do_IRQ() or the spurious interrupt handler have their separate entry code on 64 bit for no good reason. Both 32 and 64 bit transport the vector number through ORIG_[RE]AX in pt_regs. Further the vector number is forced to fit into an u8 and is complemented and offset by 0x80 so it's in the signed character range. Otherwise GAS would expand the pushq to a 5 byte instruction for any vector > 0x7F. Treat the vector number like an error code and hand it to the C function as argument. This allows to get rid of the extra entry code in a later step. Simplify the error code push magic by implementing the pushq imm8 via a '.byte 0x6a, vector' sequence so GAS is not able to screw it up. As the pushq imm8 is sign extending the resulting error code needs to be truncated to 8 bits in C code. Originally-by: Andy Lutomirski <luto@kernel.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@kernel.org> Acked-by: Andy Lutomirski <luto@kernel.org> Link: https://lore.kernel.org/r/20200521202118.796915981@linutronix.de
Diffstat (limited to 'arch/x86/kernel/idt.c')
-rw-r--r--arch/x86/kernel/idt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/idt.c b/arch/x86/kernel/idt.c
index ddb11154aeee..20408e31c18d 100644
--- a/arch/x86/kernel/idt.c
+++ b/arch/x86/kernel/idt.c
@@ -145,7 +145,7 @@ static const __initconst struct idt_data apic_idts[] = {
#ifdef CONFIG_X86_UV
INTG(UV_BAU_MESSAGE, uv_bau_message_intr1),
#endif
- INTG(SPURIOUS_APIC_VECTOR, spurious_interrupt),
+ INTG(SPURIOUS_APIC_VECTOR, spurious_apic_interrupt),
INTG(ERROR_APIC_VECTOR, error_interrupt),
#endif
};