linux_dsm_epyc7002/arch/x86/entry
Thomas Gleixner 633260fa14 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
2020-06-11 15:15:11 +02:00
..
syscalls vfs: add faccessat2 syscall 2020-05-14 16:44:25 +02:00
vdso mmap locking API: use coccinelle to convert mmap_sem rwsem call sites 2020-06-09 09:39:14 -07:00
vsyscall y2038: syscall implementation cleanups 2019-12-01 14:00:59 -08:00
calling.h x86/irq: Convey vector as argument and not in ptregs 2020-06-11 15:15:11 +02:00
common.c x86/entry: Switch XEN/PV hypercall entry to IDTENTRY 2020-06-11 15:15:08 +02:00
entry_32.S x86/irq: Convey vector as argument and not in ptregs 2020-06-11 15:15:11 +02:00
entry_64_compat.S x86/entry: Make entry_64_compat.S objtool clean 2020-06-11 15:14:40 +02:00
entry_64.S x86/irq: Convey vector as argument and not in ptregs 2020-06-11 15:15:11 +02:00
Makefile x86/entry: Make entry_64_compat.S objtool clean 2020-06-11 15:14:40 +02:00
syscall_32.c x86/entry: Drop asmlinkage from syscalls 2020-03-21 16:03:25 +01:00
syscall_64.c x86/entry: Drop asmlinkage from syscalls 2020-03-21 16:03:25 +01:00
syscall_x32.c x86/entry: Drop asmlinkage from syscalls 2020-03-21 16:03:25 +01:00
thunk_32.S x86/entry: Rename ___preempt_schedule 2020-03-21 16:03:53 +01:00
thunk_64.S x86/entry: Remove the unused LOCKDEP_SYSEXIT cruft 2020-06-11 15:14:35 +02:00