linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Sander Vanheule <sander@svanheule.net>
Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Marc Zyngier <maz@kernel.org>,
	Birger Koblitz <mail@birger-koblitz.de>,
	Bert Vermeulen <bert@biot.com>, John Crispin <john@phrozen.org>
Subject: Re: [PATCH v3 4/6] dt-bindings: interrupt-controller: realtek,rtl-intc: require parents
Date: Fri, 4 Feb 2022 20:08:09 -0600	[thread overview]
Message-ID: <Yf3cCTB5Qbz44nc/@robh.at.kernel.org> (raw)
In-Reply-To: <d291855a36f200b178aa9e7fb6e41ff438773e38.camel@svanheule.net>

On Sat, Jan 22, 2022 at 01:49:44PM +0100, Sander Vanheule wrote:
> Hi Rob,
> 
> On Fri, 2022-01-21 at 16:56 -0600, Rob Herring wrote:
> > On Sun, Jan 09, 2022 at 03:54:35PM +0100, Sander Vanheule wrote:
> > > The interrupt router has 32 inputs and up to 15 outputs, and the way
> > > these are mapped to each other is runtime configurable. The outputs of
> > > this interrupt router on the other hand, are connected to a fixed set of
> > > parent interrupts. This means that "interrupt-map" is inappropriate, and
> > > rather a list of parent interrupts should be specified.
> > 
> > I'm not sure why interrupt-map is not appropriate. It is not appropriate 
> > if you have to touch the interrupt router h/w in servicing the 
> > interrupts. If you just need one time configuration of the mapping, then 
> > it should be fine to use I think.
> 
> If interrupt-map is used, then AFAICT there are no hooks to inform the driver that a
> translation has occurred. How should the interrupt controller driver then know how to set
> up the routing? Commit de4adddcbcc2 ("of/irq: Add a quirk for controllers with their own
> definition of interrupt-map") added a quirk for the original binding/driver, but that
> requires open-coding an interrupt-map parser in the driver.

The issue was not open-coding parsing, but was the need for something in 
the middle to service the interrupt. As 'interrupt-map' should be a 
transparent remapping or routing.

> 
> What this binding doesn't mention (I can add it), is that there are also two IRQ status
> registers to:
>   - unmask/mask SoC interrupts
>   - read the current status of the SoC interrupts

That would not be transparent.

> In theory, if the routing is set up correctly (and the IRQ permanently unmasked), I think
> one could treat interrupt-map as intended, and connect SoC peripheral IRQ handlers
> directly to the parent interrupts. But then the interrupt subsystem would need to check
> all attached handlers. This interrupt router/controller allows to check which peripheral
> is triggering the parent IRQ, which should be more efficient.
>
> These interrupt controllers are also used on multi-threaded systems, where each hardware
> thread has its own IRQ controller. I'm still experimenting with the implementation, but 
> there the routing registers would be used to set the CPU affinity of SoC interrupts.
> 
> I have to say that I'm not very familiar with the kernel code that handles all this
> though, so maybe I'm just missing something?

Okay, seems 'interrupt-map' is indeed not appropriate here.

Rob

  reply	other threads:[~2022-02-05  2:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-09 14:54 [PATCH v3 0/6] Rework realtek-rtl IRQ driver Sander Vanheule
2022-01-09 14:54 ` [PATCH v3 1/6] irqchip/realtek-rtl: map control data to virq Sander Vanheule
2022-01-09 14:54 ` [PATCH v3 2/6] irqchip/realtek-rtl: fix off-by-one in routing Sander Vanheule
2022-01-09 14:54 ` [PATCH v3 3/6] irqchip/realtek-rtl: clear all pending interrupts Sander Vanheule
2022-01-09 14:54 ` [PATCH v3 4/6] dt-bindings: interrupt-controller: realtek,rtl-intc: require parents Sander Vanheule
2022-01-21 22:56   ` Rob Herring
2022-01-22 12:49     ` Sander Vanheule
2022-02-05  2:08       ` Rob Herring [this message]
2022-01-09 14:54 ` [PATCH v3 5/6] irqchip/realtek-rtl: use parent interrupts Sander Vanheule
2022-01-09 14:54 ` [PATCH v3 6/6] irqchip/realtek-rtl: use per-parent domains Sander Vanheule
2022-01-17 12:21 ` [PATCH v3 0/6] Rework realtek-rtl IRQ driver Marc Zyngier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Yf3cCTB5Qbz44nc/@robh.at.kernel.org \
    --to=robh@kernel.org \
    --cc=bert@biot.com \
    --cc=devicetree@vger.kernel.org \
    --cc=john@phrozen.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mail@birger-koblitz.de \
    --cc=maz@kernel.org \
    --cc=sander@svanheule.net \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).