[PATCH v3 0/2] irqchip/irq-realtek-rtl: Add multicore support

Markus Stockhausen posted 2 patches 3 days, 13 hours ago
drivers/irqchip/irq-realtek-rtl.c | 106 +++++++++++++++++++-----------
1 file changed, 66 insertions(+), 40 deletions(-)
[PATCH v3 0/2] irqchip/irq-realtek-rtl: Add multicore support
Posted by Markus Stockhausen 3 days, 13 hours ago
The Realtek Otto switch series consists of multiple devices.

- RTL838x: single core (Realtek proprietary IRQ controller)
- RTL839x: multi core (Realtek proprietary IRQ controller)
- RTL930x: multi core (Realtek proprietary IRQ controller)
- RTL931x: multi core (MIPS GIC controller)

The first three devices are supported by the irq-realtek-rtl
driver. Until now it only supports single core operation. So
the multi core devices cannot be driven in SMP mode.

Add multi core support to the driver.  

Remark: Device tree documentation already knows about this
feature [1]. But it never made it into the driver.

[1] https://elixir.bootlin.com/linux/v7.1-rc6/source/Documentation/devicetree/bindings/interrupt-controller/realtek,rtl-intc.yaml

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
---

v2 -> v3:
  - Remove realtek_ictl_cpu_configurable as it was basically nothing
    else than cpu_present in current setups
  - Use for_each_present_cpu() where possible
  - Simplify realtek_ictl_irq_affinity()
  - Rename soc_irq to hw_irq to stay consistent everywhere
  - Abort initialization if I/O memory is not defined for a core
v2: https://lore.kernel.org/all/20260604130627.184242-1-markus.stockhausen@gmx.de/

v1 -> v2:
  - Replace IRQ with interrupt in commit messages
  - Use unsigned int for hw_irq and cpu
  - Convert raw_spin_lock_irqsave/restore() in mask/unmask functions
    to guard(raw_spinlock)()
  - Convert raw_spin_lock_irqsave/restore() in mapping function
    to guard(raw_spinlock_irqsave)()
  - Use loop scoped variable in realtek_rtl_of_init()
  - Drop mask calculation in realtek_ictl_unmask_irq(). The affinity
    setter already takes care of that. With this properly set,
    reading irq_data_get_effective_affinity_mask() is enough.
  - Fix style issues and adapt to maintainer tip handbook
v1: https://lore.kernel.org/all/20260512184646.1896480-1-markus.stockhausen@gmx.de/


Markus Stockhausen (2):
  irqchip/irq-realtek-rtl: Add/simplify register helpers
  irqchip/irq-realtek-rtl: Add multicore support

 drivers/irqchip/irq-realtek-rtl.c | 106 +++++++++++++++++++-----------
 1 file changed, 66 insertions(+), 40 deletions(-)

-- 
2.54.0