]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: Allow IPIs to be handled as normal interrupts
authorMarc Zyngier <maz@kernel.org>
Tue, 23 Jun 2020 19:38:41 +0000 (20:38 +0100)
committerMarc Zyngier <maz@kernel.org>
Sun, 13 Sep 2020 16:05:39 +0000 (17:05 +0100)
commitad6e1f1697409992a57940de805d5c89615a44dc
treec162ead6473ce3758eb69d9347cdc23a52cb4d9d
parented49b4328fa130b2a77c6a20b3937d81140689f1
ARM: Allow IPIs to be handled as normal interrupts

In order to deal with IPIs as normal interrupts, let's add
a new way to register them with the architecture code.

set_smp_ipi_range() takes a range of interrupts, and allows
the arch code to request them as if the were normal interrupts.
A standard handler is then called by the core IRQ code to deal
with the IPI.

This means that we don't need to call irq_enter/irq_exit, and
that we don't need to deal with set_irq_regs either. So let's
move the dispatcher into its own function, and leave handle_IPI()
as a compatibility function.

On the sending side, let's make use of ipi_send_mask, which
already exists for this purpose.

One of the major difference is that we end up, in some cases
(such as when performing IRQ time accounting on the scheduler
IPI), end up with nested irq_enter()/irq_exit() pairs.
Other than the (relatively small) overhead, there should be
no consequences to it (these pairs are designed to nest
correctly, and the accounting shouldn't be off).

Reviewed-by: Valentin Schneider <valentin.schneider@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm/Kconfig
arch/arm/include/asm/smp.h
arch/arm/kernel/smp.c