irqchip/loongson-eiointc: Add multiple interrupt pin routing support
authorBibo Mao <maobibo@loongson.cn>
Mon, 4 Aug 2025 08:19:46 +0000 (16:19 +0800)
committerThomas Gleixner <tglx@linutronix.de>
Sun, 24 Aug 2025 10:51:04 +0000 (12:51 +0200)
commit8ff1c16c753e293c3ba20583cb64f81ea7b9a451
treeec8adb7870a83df85a3c6c15a305116f01e398d0
parent7fb83eb664e9b3a0438dd28859e9f0fd49d4c165
irqchip/loongson-eiointc: Add multiple interrupt pin routing support

The eiointc interrupt controller supports 256 interrupt vectors at most,
and the interrupt handler gets the interrupt status from the base register
group EIOINTC_REG_ISR at the interrupt specific offset.

It needs to read the register group EIOINTC_REG_ISR four times to get all
256 interrupt vectors status.

Eiointc registers including EIOINTC_REG_ISR are software emulated for
VMs, so there will be VM-exits when accessing eiointc registers.

Introduce a method to make the eiointc interrupt controller route
to different CPU interrupt pins for every 64 interrupt vectors.

The interrupt handler can then reduce the read to one specific
EIOINTC_REG_ISR register instead of all four, which reduces VM exits.

[ tglx: Massage change log ]

Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20250804081946.1456573-3-maobibo@loongson.cn
drivers/irqchip/irq-loongson-eiointc.c