linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Support 1 of N SPI interrupt for interrupt distribution
@ 2020-11-27 14:15 Hanks Chen
  2020-11-27 14:15 ` [PATCH v1 1/3] irqchip/gic: enable irq target all Hanks Chen
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Hanks Chen @ 2020-11-27 14:15 UTC (permalink / raw)
  To: Thomas Gleixner, Jason Cooper, Marc Zyngier, Matthias Brugger,
	Russell King, Catalin Marinas, Will Deacon, Mark Rutland
  Cc: linux-arm-kernel, linux-kernel, linux-mediatek, CC Hwang,
	Kuohong Wang, Loda Chou, Hanks Chen

*** BLURB HERE ***
The GICv3 supports 1 of N selection of SPI interrupts.
When the GICD_IROUTERn.Interrupt_Routing_Mode == 1, the GIC selects
the appropriate core for a SPI.

Actually, dispatch the interrupt by hardware Interrupt Control Unit
is more efficient than irqbalance of software logic
and no need to implement software contoller to decide the targeted CPU
on various platform.

In order to reduce interrupt latency, all interrupts are targeted to
each online CPU defaultly by 1 of N selection of SPI interrupts.
That is, SPI interrupts might be serviced simultaneously on different CPUs.

[default policy]
AS-IS (target to boot CPU)
       CPU0       CPU1       CPU2       CPU3
 29:     92          0          0          0     GICv3 141 Level   ttyS0

TO-BE (enable ARM_IRQ_TARGET_ALL)
       CPU0       CPU1       CPU2       CPU3
 29:     23         23         24         22     GICv3 141 Level   ttyS0


Hanks Chen (3):
  irqchip/gic: enable irq target all
  arm: disable irq on cpu shutdown flow
  arm64: disable irq on cpu shutdown flow

 arch/arm/kernel/smp.c              |  10 ++-
 arch/arm64/kernel/smp.c            |   9 ++-
 drivers/irqchip/Kconfig            |  12 ++++
 drivers/irqchip/irq-gic-v3.c       | 107 +++++++++++++++++++++--------
 include/linux/irqchip/arm-gic-v3.h |   1 +
 kernel/irq/cpuhotplug.c            |  22 ++++++
 kernel/irq/manage.c                |   7 ++
 7 files changed, 138 insertions(+), 30 deletions(-)

-- 
2.18.0


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-12-02 11:10 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-27 14:15 Support 1 of N SPI interrupt for interrupt distribution Hanks Chen
2020-11-27 14:15 ` [PATCH v1 1/3] irqchip/gic: enable irq target all Hanks Chen
2020-11-27 18:11   ` Marc Zyngier
2020-11-27 18:56     ` Catalin Marinas
2020-11-27 19:43       ` Marc Zyngier
2020-12-01 13:54     ` Hanks Chen
2020-12-02 11:09       ` Thomas Gleixner
2020-11-27 14:15 ` [PATCH v1 2/3] arm: disable irq on cpu shutdown flow Hanks Chen
2020-11-27 14:15 ` [PATCH v1 3/3] arm64: " Hanks Chen
2020-11-27 18:27   ` Marc Zyngier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).