| From | Andy Lutomirski <> | Date | Tue, 19 May 2020 13:27:43 -0700 | Subject | Re: [patch V6 21/37] x86/entry: Add IRQENTRY_IRQ macro |
| |
On Fri, May 15, 2020 at 5:10 PM Thomas Gleixner <tglx@linutronix.de> wrote: > > > Provide a seperate IDTENTRY macro for device interrupts. Similar to > IDTENTRY_ERRORCODE with the addition of invoking irq_enter/exit_rcu() and > providing the errorcode as a 'u8' argument to the C function, which > truncates the sign extended vector number.
Acked-by: Andy Lutomirski <luto@kernel.org>
with a minor minor optimization suggestion:
> +.macro idtentry_irq vector cfunc > + .p2align CONFIG_X86_L1_CACHE_SHIFT > +SYM_CODE_START_LOCAL(asm_\cfunc) > + ASM_CLAC > + SAVE_ALL switch_stacks=1 > + ENCODE_FRAME_POINTER > + movl %esp, %eax > + movl PT_ORIG_EAX(%esp), %edx /* get the vector from stack */
You could save somewhere between 0 and 1 cycles by using movzbl here...
> + __##func (regs, (u8)error_code); \
And eliminating this cast. Totally worth it, right?
|