Skip to content

irqchip/econet-en751221: Support MIPS 34Kc VEIC mode

Caleb James DeLisle linux-devicetree linux-mips lkml 3 versions – Applied

Status from this message: The following commit has been merged into the irq/drivers branch of tip:

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 1 replyApplied
  2. v22 patches 1 replySuperseded
  3. v12 patches 4 repliesSuperseded

Changes in v3 from the cover letter

* Fix goofup that changes were not actually in the patch...
* v2: https://lore.kernel.org/linux-mips/[email protected]/

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/2dt-bindings: interrupt-controller: econet: Add CPU interrupt mappingDocumentation/devicetree/bindings/interrupt-controller/econet,en751221-intc.yaml+20 -01 reply
2/2irqchip/econet-en751221: Support MIPS 34Kc VEIC modedrivers/irqchip/irq-econet-en751221.c+179 -80 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchRob Herring (Arm)
1/2R-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/2] irqchip/econet-en751221: Support MIPS 34Kc VEIC mode

MIPS 34Kc and 1004Kc have a Vectored External Interrupt mode, where CPU interrupts are re-routed to the external interrupt controller, which prioritizes them, renumbers them, and integrates them with its own, creating a flat interrupt table.

This bypasses the CPU interrupt controller entirely, which is not ideal for modern Linux which formalizes the interrupt hierarchy. The 1004Kc standardized the interrupt controller (MIPS_GIC) so it can be viewed as "part of the CPU" and it's tolerable for it to be more closely coupled to arch/mips/* than a typical interrupt controller driver.

The 34Kc supports VEIC mode, but the interrupt controller is not standardized, so it's different per-SoC. This creates a challenge of writing a reasonably modular driver, given hardware that actually does take over the interrupt hierarchy.

Ordinarily we wouldn't bother with VEIC on the 34Kc but it is required for MIPS_MT_SMP, so without it you get a single thread processor. The only other 34Kc device which has an in-tree DTS file is realtek,rtl9302-soc, in OpenWrt there is this, realtek,rtl839x-soc, and lantiq,xway. Of these, the realtek,rtl839x-soc has multi-thread support via an out-of-tree patch to its interrupt controller, and the lantiq is not 34Kc compliant in that it lacks the VEIC cpu flag, causing linux to fall back on legacy interrupts despite CPU_MIPSR2_IRQ_EI being set.

This patchset aims to tackle this challenge in a way that is most likely generalizable to other 34Kc interrupt controllers which are facing the same problem.

Changes from v2:
* Fix goofup that changes were not actually in the patch...
* v2: https://lore.kernel.org/linux-mips/[email protected]/

Changes from v1:
* Address notes from Thomas Gleixner (Thank you very much!)
* Additional info in cover letter regarding lantiq,xway
* v1: https://lore.kernel.org/linux-mips/[email protected]/

Caleb James DeLisle (2):
dt-bindings: interrupt-controller: econet: Add CPU interrupt mapping irqchip/econet-en751221: Support MIPS 34Kc VEIC mode

 .../econet,en751221-intc.yaml                 |  20 ++
 drivers/irqchip/irq-econet-en751221.c         | 187 +++++++++++++++++-
 2 files changed, 199 insertions(+), 8 deletions(-)

base-commit: e8be82c2d77ec1bb0148406e54b105028a83537e

Signature · 1 line
2.39.5