On Fri, May 15, 2020 at 5:10 PM Thomas Gleixner <t...@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 <l...@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?

Reply via email to