[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAL_Jsq+OuYfuNM4pNL7aZ4tTHGTXzYcH1W-8xi=eEe2zOoq6nw@mail.gmail.com>
Date: Mon, 13 Sep 2021 16:13:26 -0500
From: Rob Herring <robh+dt@...nel.org>
To: Marc Zyngier <maz@...nel.org>
Cc: devicetree@...r.kernel.org,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
PCI <linux-pci@...r.kernel.org>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Krzysztof WilczyĆski <kw@...ux.com>,
Alyssa Rosenzweig <alyssa@...enzweig.io>,
Stan Skowronek <stan@...ellium.com>,
Mark Kettenis <kettenis@...nbsd.org>,
Sven Peter <sven@...npeter.dev>,
Hector Martin <marcan@...can.st>,
Robin Murphy <Robin.Murphy@....com>,
Android Kernel Team <kernel-team@...roid.com>
Subject: Re: [PATCH v3 02/10] of/irq: Allow matching of an interrupt-map local
to an interrupt controller
On Mon, Sep 13, 2021 at 1:26 PM Marc Zyngier <maz@...nel.org> wrote:
>
> of_irq_parse_raw() has a baked assumption that if a node has an
> interrupt-controller property, it cannot possibly also have an
> interrupt-map property (the latter being ignored).
>
> This seems to be an odd behaviour, and there are no reason why
s/are/is/
> we should avoid supporting this use case. This is specially
> useful when a PCI root port acts as an interrupt controller for
> PCI endpoints, such as this:
>
> pcie0: pcie@...000000 {
> [...]
> port00: pci@0,0 {
> device_type = "pci";
> [...]
> #address-cells = <3>;
>
> interrupt-controller;
> #interrupt-cells = <1>;
>
> interrupt-map-mask = <0 0 0 7>;
> interrupt-map = <0 0 0 1 &port00 0 0 0 0>,
> <0 0 0 2 &port00 0 0 0 1>,
> <0 0 0 3 &port00 0 0 0 2>,
> <0 0 0 4 &port00 0 0 0 3>;
> };
> };
>
> Handle it by detecting that we have an interrupt-map early in the
> parsing, and special case the situation where the phandle in the
> interrupt map refers to the current node (which is the interesting
> case here).
>
> Signed-off-by: Marc Zyngier <maz@...nel.org>
> ---
> drivers/of/irq.c | 17 ++++++++++++-----
> 1 file changed, 12 insertions(+), 5 deletions(-)
Reviewed-by: Rob Herring <robh@...nel.org>
Powered by blists - more mailing lists