Message ID | 20240720171232.1753-8-jszhang@kernel.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | riscv: convert bottom half of exception handling to C | expand |
diff --git a/arch/riscv/kernel/traps.c b/arch/riscv/kernel/traps.c index dc1bc84cfe15..030c50cb4e78 100644 --- a/arch/riscv/kernel/traps.c +++ b/arch/riscv/kernel/traps.c @@ -378,7 +378,7 @@ static void noinstr handle_riscv_irq(struct pt_regs *regs) irq_exit_rcu(); } -static void noinstr do_irq(struct pt_regs *regs) +static __always_inline void do_irq(struct pt_regs *regs) { irqentry_state_t state = irqentry_enter(regs);
Since do_irq() is only called in traps.c, so mark it as __always_inline this will allow the compiler to get rid of the stack setup/tear down code and eliminate a handful of instructions. Signed-off-by: Jisheng Zhang <jszhang@kernel.org> --- arch/riscv/kernel/traps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)