From: Rob Herring <robh+dt@kernel.org> To: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Jessica Clarke <jrtc27@jrtc27.com>, Thomas Gleixner <tglx@linutronix.de>, Marc Zyngier <maz@kernel.org>, Palmer Dabbelt <palmer@dabbelt.com>, Paul Walmsley <paul.walmsley@sifive.com>, Sagar Kadam <sagar.kadam@sifive.com>, "linux-kernel@vger.kernel.org List" <linux-kernel@vger.kernel.org>, "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" <devicetree@vger.kernel.org>, linux-riscv <linux-riscv@lists.infradead.org>, Michael Zhu <michael.zhu@starfivetech.com> Subject: Re: [PATCH] dt-bindings: interrupt-controller: sifive, plic: Fix number of interrupts Date: Tue, 30 Nov 2021 17:01:06 -0600 [thread overview] Message-ID: <CAL_JsqLr53hm2ai6EwxGg=nMoYqJnOkPGHXmjA1Yh31ReE_hUA@mail.gmail.com> (raw) In-Reply-To: <CAMuHMdXpmnmAy7cvA4b9LZe1skzjyOmYgUMgY7KiLRPznSj+2Q@mail.gmail.com> On Fri, Nov 26, 2021 at 2:58 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote: > > Hi Jessica, > > On Thu, Nov 25, 2021 at 5:08 PM Jessica Clarke <jrtc27@jrtc27.com> wrote: > > On 25 Nov 2021, at 15:22, Geert Uytterhoeven <geert@linux-m68k.org> wrote: > > > To improve human readability and enable automatic validation, the tuples > > > in "interrupts-extended" properties should be grouped using angle > > > brackets. As the DT bindings lack an upper bound on the number of > > > interrupts, thus assuming one, proper grouping is currently flagged as > > > an error. > > Rob: Is this a bug in the tooling that should be fixed? The grouping or upper bound? The tools default to minItems == maxItems, so you be getting 'maxItems: 1' here. For grouping, I plan to make this not matter for validation. I'm working on making the validation operate on dtbs and we lose any source grouping with that. I'll probably switch the kernel to use dtbs as well because I don't want to maintain both. Still, I think the grouping is good from a source consistency POV. > Regardless, specifying a real upper limit is always a good idea. Yes. A 'should be enough for now' limit is better than none IMO, too. > > > > Fix this by adding the missing "maxItems", limiting it to 9 interrupts > > > (one interrupt for a system management core, and two interrupts per core > > > for other cores), which should be sufficient for now. > > > > This is SiFive’s IP, so is this actually true? I would imagine it’s > > just parameterised and could be generated with as many targets as fit > > in the MMIO space, and that this is thus inaccurate. Besides, such a > > Yes, this is implementation-defined. I just used the maximum value > currently in use. > > drivers/irqchip/irq-sifive-plic.c has #define MAX_CONTEXTS 15872, > which matches the value of CONTEXT_PER_HART and the available address > space in the driver and in [1]. > Would you be more comfortable with "maxItems: 15872"? Always good to have a real value rather than an unknown implementation limit. Rob
WARNING: multiple messages have this Message-ID (diff)
From: Rob Herring <robh+dt@kernel.org> To: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Jessica Clarke <jrtc27@jrtc27.com>, Thomas Gleixner <tglx@linutronix.de>, Marc Zyngier <maz@kernel.org>, Palmer Dabbelt <palmer@dabbelt.com>, Paul Walmsley <paul.walmsley@sifive.com>, Sagar Kadam <sagar.kadam@sifive.com>, "linux-kernel@vger.kernel.org List" <linux-kernel@vger.kernel.org>, "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" <devicetree@vger.kernel.org>, linux-riscv <linux-riscv@lists.infradead.org>, Michael Zhu <michael.zhu@starfivetech.com> Subject: Re: [PATCH] dt-bindings: interrupt-controller: sifive, plic: Fix number of interrupts Date: Tue, 30 Nov 2021 17:01:06 -0600 [thread overview] Message-ID: <CAL_JsqLr53hm2ai6EwxGg=nMoYqJnOkPGHXmjA1Yh31ReE_hUA@mail.gmail.com> (raw) In-Reply-To: <CAMuHMdXpmnmAy7cvA4b9LZe1skzjyOmYgUMgY7KiLRPznSj+2Q@mail.gmail.com> On Fri, Nov 26, 2021 at 2:58 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote: > > Hi Jessica, > > On Thu, Nov 25, 2021 at 5:08 PM Jessica Clarke <jrtc27@jrtc27.com> wrote: > > On 25 Nov 2021, at 15:22, Geert Uytterhoeven <geert@linux-m68k.org> wrote: > > > To improve human readability and enable automatic validation, the tuples > > > in "interrupts-extended" properties should be grouped using angle > > > brackets. As the DT bindings lack an upper bound on the number of > > > interrupts, thus assuming one, proper grouping is currently flagged as > > > an error. > > Rob: Is this a bug in the tooling that should be fixed? The grouping or upper bound? The tools default to minItems == maxItems, so you be getting 'maxItems: 1' here. For grouping, I plan to make this not matter for validation. I'm working on making the validation operate on dtbs and we lose any source grouping with that. I'll probably switch the kernel to use dtbs as well because I don't want to maintain both. Still, I think the grouping is good from a source consistency POV. > Regardless, specifying a real upper limit is always a good idea. Yes. A 'should be enough for now' limit is better than none IMO, too. > > > > Fix this by adding the missing "maxItems", limiting it to 9 interrupts > > > (one interrupt for a system management core, and two interrupts per core > > > for other cores), which should be sufficient for now. > > > > This is SiFive’s IP, so is this actually true? I would imagine it’s > > just parameterised and could be generated with as many targets as fit > > in the MMIO space, and that this is thus inaccurate. Besides, such a > > Yes, this is implementation-defined. I just used the maximum value > currently in use. > > drivers/irqchip/irq-sifive-plic.c has #define MAX_CONTEXTS 15872, > which matches the value of CONTEXT_PER_HART and the available address > space in the driver and in [1]. > Would you be more comfortable with "maxItems: 15872"? Always good to have a real value rather than an unknown implementation limit. Rob _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2021-11-30 23:01 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-11-25 15:22 [PATCH] dt-bindings: interrupt-controller: sifive, plic: Fix number of interrupts Geert Uytterhoeven 2021-11-25 15:22 ` [PATCH] dt-bindings: interrupt-controller: sifive,plic: " Geert Uytterhoeven 2021-11-25 16:08 ` [PATCH] dt-bindings: interrupt-controller: sifive, plic: " Jessica Clarke 2021-11-25 16:08 ` Jessica Clarke 2021-11-26 8:58 ` Geert Uytterhoeven 2021-11-26 8:58 ` Geert Uytterhoeven 2021-11-26 9:05 ` Anup Patel 2021-11-26 9:05 ` Anup Patel 2021-11-30 23:01 ` Rob Herring [this message] 2021-11-30 23:01 ` 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='CAL_JsqLr53hm2ai6EwxGg=nMoYqJnOkPGHXmjA1Yh31ReE_hUA@mail.gmail.com' \ --to=robh+dt@kernel.org \ --cc=devicetree@vger.kernel.org \ --cc=geert@linux-m68k.org \ --cc=jrtc27@jrtc27.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-riscv@lists.infradead.org \ --cc=maz@kernel.org \ --cc=michael.zhu@starfivetech.com \ --cc=palmer@dabbelt.com \ --cc=paul.walmsley@sifive.com \ --cc=sagar.kadam@sifive.com \ --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: linkBe 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.