Linus Torvalds writes: (Summary)
Look at the "interrupt" macro, which is used by 'apicinterrupt3', and
has a number of uses that way.
has a number of uses that way.
That code could be unified a lot, right now it does: That code could be unified a lot, right now it does: testb $3, CS-ORIG_RAX(%rsp)
jz 1f
SWAPGS
call switch_to_thread_stack
1:
1:
ALLOC_PT_GPREGS_ON_STACK
SAVE_C_REGS
SAVE_EXTRA_REGS
ENCODE_FRAME_POINTER
ENCODE_FRAME_POINTER
testb $3, CS(%rsp)
jz 1f
jz 1f
has a number of uses that way.
That code could be unified a lot, right now it does: That code could be unified a lot, right now it does: testb $3, CS-ORIG_RAX(%rsp)
jz 1f
SWAPGS
call switch_to_thread_stack
1:
1:
ALLOC_PT_GPREGS_ON_STACK
SAVE_C_REGS
SAVE_EXTRA_REGS
ENCODE_FRAME_POINTER
ENCODE_FRAME_POINTER
testb $3, CS(%rsp)
jz 1f
jz 1f
/* * IRQ from user mode.