All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
To: Rob Herring <robh@kernel.org>, Marc Zyngier <maz@kernel.org>
Cc: Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"kernel-team@android.com" <kernel-team@android.com>,
	John Crispin <john@phrozen.org>, Biwen Li <biwen.li@nxp.com>,
	Chris Brandt <Chris.Brandt@renesas.com>,
	"linux-renesas-soc@vger.kernel.org" 
	<linux-renesas-soc@vger.kernel.org>
Subject: Re: [PATCH] of/irq: Add a quirk for controllers with their own definition of interrupt-map
Date: Tue, 30 Nov 2021 12:52:21 +0000	[thread overview]
Message-ID: <CA+V-a8sVS_1hUWJ3uM+VffGyMtdnctBOJTyHTQAoJZGOh0a1Tw@mail.gmail.com> (raw)
In-Reply-To: <CAL_JsqK+GcnChx3i9fsYnw+FzZgON4PtKB=CzYLUj6sXtxX6fQ@mail.gmail.com>

On Mon, Nov 29, 2021 at 6:33 PM Rob Herring <robh@kernel.org> wrote:
>
> On Mon, Nov 29, 2021 at 6:13 AM Lad, Prabhakar
> <prabhakar.csengg@gmail.com> wrote:
> >
>
> I timed my vacation well...
>
> > On Mon, Nov 29, 2021 at 10:34 AM Marc Zyngier <maz@kernel.org> wrote:
> > >
> > > On Sat, 27 Nov 2021 00:42:49 +0000,
> > > Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com> wrote:
> > > >
> > > > Hi Marc,
> > > >
> > > > > -----Original Message-----
> > > > > From: Marc Zyngier <maz@kernel.org>
> > > > > Sent: 23 November 2021 09:11
> > > > > To: Geert Uytterhoeven <geert@linux-m68k.org>
> > > > > Cc: linux-kernel@vger.kernel.org; devicetree@vger.kernel.org; kernel-team@android.com; Rob Herring
> > > > > <robh@kernel.org>; John Crispin <john@phrozen.org>; Biwen Li <biwen.li@nxp.com>; Chris Brandt
> > > > > <Chris.Brandt@renesas.com>; linux-renesas-soc@vger.kernel.org; Prabhakar Mahadev Lad
> > > > > <prabhakar.mahadev-lad.rj@bp.renesas.com>
> > > > > Subject: Re: [PATCH] of/irq: Add a quirk for controllers with their own definition of interrupt-map
> > > > >
> > > > > On Tue, 23 Nov 2021 08:44:19 +0000,
> > > > > Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > > > > >
> > > > > > Hi Marc,
> > > > > >
> > > > > > On Tue, Nov 23, 2021 at 9:33 AM Marc Zyngier <maz@kernel.org> wrote:
> > > > > > > On Tue, 23 Nov 2021 07:57:48 +0000,
> > > > > > > Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > > > > > > > Summarized:
> > > > > > > >   - Before the bad commit, and after your fix, irqc-rza1 is invoked,
> > > > > > > >     and the number of interrupts seen is correct, but input events
> > > > > > > >     are doubled.
> > > > > > > >   - After the bad commit, irqc-rza1 is not invoked, and there is an
> > > > > > > >     interrupt storm, but input events are OK.
> > > > > > >
> > > > > > > OK, that's reassuring, even if the "twice the events" stuff isn't
> > > > > > > what you'd expect. We at least know this is a separate issue, and
> > > > > > > that this patch on top of -rc1 brings you back to the 5.15 behaviour.
> > > > > > >
> > > > > > > I'd expect it to be the case for the other platforms as well.
> > > > > >
> > > > > > OK.
> > > > > >
> > > > > > BTW, what would have been the correct way to do this for irqc-rza1?
> > > > > > I think we're about to make the same mistake with RZ/G2L IRQC
> > > > > > support[1]?
> > > > >
> > > > > Indeed, and I was about to look into it.
> > > > >
> > > > > There are multiple ways to skin this cat, including renaming 'interrupt-map' to 'my-own-private-
> > > > > interrupt-map'. Or use something akin the new 'msi-range' (which we could call interrupt-range), and
> > > > > replace:
> > > > >
> > > > >   interrupt-map = <0 0 &gic GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>,
> > > > >                   <1 0 &gic GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>,
> > > > >                   <2 0 &gic GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>,
> > > > >                   <3 0 &gic GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>,
> > > > >                   <4 0 &gic GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
> > > > >                   <5 0 &gic GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>,
> > > > >                   <6 0 &gic GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>,
> > > > >                   <7 0 &gic GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
> > > > >
> > > > > with:
> > > > >
> > > > >   interrupt-range = <&gic GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH 0 8>;
>
> interrupts would work just fine here:
>
> interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>,
>   <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>,
>   <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>,
>   <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>,
>   <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
>   <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>,
>   <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>,
>   <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
>
> We don't need a different solution for N:1 interrupts from N:M. Sure,
> that could become unweldy if there are a lot of interrupts (just like
> interrupt-map), but is that an immediate problem?
>
It's just that with this approach the driver will have to index the
interrupts instead of reading from DT.

Marc - is it OK with the above approach?

> > > > >
> > > > Just to clarify, do you suggest to add interrupt-range as a generic
> > > > DT property or SoC/company specific property?
> > >
> > > As a generic one. I have no interest in SoC-specific stuff (though you
> > > are free to invent your own and run it by Rob).
> > >
> > OK will go with a generic one.
> >
> > > > If you meant to add generic property where would you suggest to
> > > > document this property?
> > >
> > > Ideally collocated with the rest of the interrupt properties.
> > >
> > OK, I will go with interrupts.txt for now. Is that OK with you Rob?
>
> Nope. As the rest of interrupts are documented in DT Spec it goes
> there and there needs to be a schema (in dtschema).
>
Agreed.

> > (the reason I ask because interrupt-map/mask haven't been documented).
>
> Yes, they are. Only for the last 20+ years.
>
My bad I was referring in
Documentation/devicetree/bindings/interrupt-controller/

Cheers,
Prabhakar

> Rob

  reply	other threads:[~2021-11-30 12:52 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-22 10:30 [PATCH] of/irq: Add a quirk for controllers with their own definition of interrupt-map Marc Zyngier
2021-11-22 13:10 ` Geert Uytterhoeven
2021-11-22 13:54   ` Marc Zyngier
2021-11-22 16:58     ` Geert Uytterhoeven
2021-11-23  7:57       ` Geert Uytterhoeven
2021-11-23  8:33         ` Marc Zyngier
2021-11-23  8:44           ` Geert Uytterhoeven
2021-11-23  9:11             ` Marc Zyngier
2021-11-24  7:54               ` Geert Uytterhoeven
2021-11-24 11:14                 ` Marc Zyngier
2021-11-27  0:42               ` Prabhakar Mahadev Lad
2021-11-29 10:34                 ` Marc Zyngier
2021-11-29 12:13                   ` Lad, Prabhakar
2021-11-29 18:33                     ` Rob Herring
2021-11-30 12:52                       ` Lad, Prabhakar [this message]
2021-11-30 18:36                         ` Marc Zyngier
2021-12-01 13:36                           ` Lad, Prabhakar
2021-12-01 14:35                             ` Rob Herring
2021-12-01 16:16                               ` Lad, Prabhakar
2021-12-05 22:27                                 ` Lad, Prabhakar
2021-12-06 10:26                                   ` Marc Zyngier
2021-12-06 16:55                                     ` Lad, Prabhakar
2021-12-06 18:59                                       ` Rob Herring
2021-11-23 11:02           ` Geert Uytterhoeven
2021-11-23  8:40 ` Sander Vanheule
2021-11-23  9:12   ` Marc Zyngier
2021-11-29 19:15 ` Rob Herring
2021-11-29 19:31   ` Marc Zyngier
2021-11-29 19:40     ` Rob Herring

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=CA+V-a8sVS_1hUWJ3uM+VffGyMtdnctBOJTyHTQAoJZGOh0a1Tw@mail.gmail.com \
    --to=prabhakar.csengg@gmail.com \
    --cc=Chris.Brandt@renesas.com \
    --cc=biwen.li@nxp.com \
    --cc=devicetree@vger.kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=john@phrozen.org \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=robh@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.