irq: add generic_handle_arch_irq()
authorMark Rutland <mark.rutland@arm.com>
Wed, 20 Oct 2021 10:24:06 +0000 (11:24 +0100)
committerMark Rutland <mark.rutland@arm.com>
Mon, 25 Oct 2021 09:05:27 +0000 (10:05 +0100)
commita1b09501971435ef213251891753afb0d7f3d27a
treeeadab2b1aef05e291de205bca2f17cab67871f86
parent76adc5be6f505d0c137b210a95ad00dbd089473d
irq: add generic_handle_arch_irq()

Several architectures select GENERIC_IRQ_MULTI_HANDLER and branch to
handle_arch_irq() without performing any entry accounting.

Add a generic wrapper to handle the common irqentry work when invoking
handle_arch_irq(). Where an architecture needs to perform some entry
accounting itself, it will need to invoke handle_arch_irq() itself.

In subsequent patches it will become the responsibilty of the entry code
to set the irq regs when entering an IRQ (rather than deferring this to
an irqchip handler), so generic_handle_arch_irq() is made to set the irq
regs now. This can be redundant in some cases, but is never harmful as
saving/restoring the old regs nests safely.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Guo Ren <guoren@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
include/linux/irq.h
kernel/irq/handle.c