From: Sudeep Holla <sudeep.holla@arm.com>
To: Jassi Brar <jassisinghbrar@gmail.com>
Cc: Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Sudeep Holla <sudeep.holla@arm.com>,
Jassi Brar <jaswinder.singh@linaro.org>,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH] dt-bindings: mailbox: arm,mhu: Make secure interrupt optional
Date: Fri, 29 Jul 2022 12:10:51 +0100 [thread overview]
Message-ID: <20220729111051.5me4vklrzskvsj4w@bogus> (raw)
In-Reply-To: <CABb+yY0JzztBB+giBu+RCt-dzgwYWF32sCR3WKKP9U5K9UvhxA@mail.gmail.com>
On Thu, Jul 28, 2022 at 04:07:45PM -0500, Jassi Brar wrote:
> On Thu, Jul 28, 2022 at 3:17 PM Jassi Brar <jassisinghbrar@gmail.com> wrote:
> >
> > On Thu, Jul 28, 2022 at 2:08 PM Rob Herring <robh@kernel.org> wrote:
> > >
> > > The secure interrupt is only useful to secure world, therefore for NS
> > > users it shouldn't be required. Make it optional.
> > >
> > > This fixes a warning on Arm Juno board:
> > >
> > > mhu@2b1f0000: interrupts: [[0, 36, 4], [0, 35, 4]] is too short
> > >
> > > Signed-off-by: Rob Herring <robh@kernel.org>
> > > ---
> > > Documentation/devicetree/bindings/mailbox/arm,mhu.yaml | 1 +
> > > 1 file changed, 1 insertion(+)
> > >
> > > diff --git a/Documentation/devicetree/bindings/mailbox/arm,mhu.yaml b/Documentation/devicetree/bindings/mailbox/arm,mhu.yaml
> > > index bd49c201477d..d9a4f4a02d7c 100644
> > > --- a/Documentation/devicetree/bindings/mailbox/arm,mhu.yaml
> > > +++ b/Documentation/devicetree/bindings/mailbox/arm,mhu.yaml
> > > @@ -57,6 +57,7 @@ properties:
> > > maxItems: 1
> > >
> > > interrupts:
> > > + minItems: 2
> > > items:
> > > - description: low-priority non-secure
> > > - description: high-priority non-secure
> > >
> > Do we also want to specify that only the secure-irq is optional
> > because irqs are directly mapped onto channels in the driver, and only
> > omitting the secure (last) irq will work.
> >
> I could learn why specifying secure irq isn't desirable?
> No non-secure client node would ask for that secure irq/channel, which
> will simply lay unused.
>
Did you mean would or wouldn't ?
Anyways I can insert a module that requests this channel and bring down
the system as accessing anything configure secure from non-secure side
on Juno results in system hang/error.
> The programming of the secure channel doesn't care if the mode is
> indeed secure. It all relies on providing accurate information in the
> device tree :- the controller provides secure and non-secure channels
> but only non-secure channels are _used_ in non-secure mode.
>
In general w.r.t the MHU IP may be yes. But if the secure side configures
it as secure only and claims the channel which is the case on Juno, any
attempt to access the same from non-secure side is fatal.
> index f6c55877fbd94..004b1566be74d 100644
> --- a/arch/arm64/boot/dts/arm/juno-base.dtsi
> +++ b/arch/arm64/boot/dts/arm/juno-base.dtsi
> @@ -26,7 +26,8 @@ mailbox: mhu@2b1f0000 {
> compatible = "arm,mhu", "arm,primecell";
> reg = <0x0 0x2b1f0000 0x0 0x1000>;
> interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>,
> - <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
> + <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>,
> + <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
> interrupt-names = "mhu_lpri_rx",
> "mhu_hpri_rx";
> #mbox-cells = <1>;
>
> If this works for you, I could submit a proper patch.
>
No this doesn't work IMO. Yes standalone everything looks fine, but you can
insert a module requesting this channel and bring down the system. So I am
not for this change.
--
Regards,
Sudeep
next prev parent reply other threads:[~2022-07-29 11:10 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-28 19:08 [PATCH] dt-bindings: mailbox: arm,mhu: Make secure interrupt optional Rob Herring
2022-07-28 20:17 ` Jassi Brar
2022-07-28 21:07 ` Jassi Brar
2022-07-29 11:10 ` Sudeep Holla [this message]
2022-07-29 15:18 ` Jassi Brar
2022-08-01 10:23 ` Sudeep Holla
2022-08-01 13:57 ` Jassi Brar
2022-08-01 14:18 ` Sudeep Holla
2022-07-29 23:17 ` Rob Herring
2022-08-01 10:28 ` Sudeep Holla
2022-07-29 8:48 ` Sudeep Holla
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=20220729111051.5me4vklrzskvsj4w@bogus \
--to=sudeep.holla@arm.com \
--cc=devicetree@vger.kernel.org \
--cc=jassisinghbrar@gmail.com \
--cc=jaswinder.singh@linaro.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox