Re: [RFC PATCH v3 06/11] dt-bindings: timer: Update SiFive CLINT bindings for IPI support

From: Rob Herring
Date: Wed Sep 01 2021 - 20:18:48 EST


On Wed, Sep 1, 2021 at 7:00 AM Anup Patel <anup@xxxxxxxxxxxxxx> wrote:
>
> On Wed, Sep 1, 2021 at 6:59 AM Rob Herring <robh@xxxxxxxxxx> wrote:
> >
> > On Mon, Aug 30, 2021 at 09:47:24AM +0530, Anup Patel wrote:
> > > The Linux RISC-V now treats IPIs as regular per-CPU IRQs. This means
> > > we have to create a IPI interrupt domain to use CLINT IPI functionality
> > > hence requiring a "interrupt-controller" and "#interrupt-cells" DT
> > > property in CLINT DT nodes.
> > >
> > > Impact of this CLINT DT bindings change only affects Linux RISC-V
> > > NoMMU kernel and has no effect of existing M-mode runtime firmwares
> > > (i.e. OpenSBI).
> >
> > It appears to me you should fix Linux to not need these 2 useless
> > properties. I say useless because #interrupt-cells being 0 is pretty
> > useless.
>
> Linux IRQCHIP framework only probes IRQCHIP DT nodes which
> have "interrupt-controller" DT property.

Right, I believe I wrote that... So what would it look like to fix
that? The simplest thing is just drop the check for
'interrupt-controller'. That's just a sanity check and we have other
ways to do that now (schemas). Do you need this early? You can always
implement your own initcall.


> The "interrupt-cells" DT property
> can be removed because as an interrupt controller SiFive CLINT
> will only provide IPIs to arch code.

The schema will disagree.

Rob