lkml.org 
[lkml]   [2020]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [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?

\
 
 \ /
  Last update: 2020-05-19 22:28    [W:0.930 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site