lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 3 May 2022 16:41:25 -0400
From:   Nícolas F. R. A. Prado 
        <nfraprado@...labora.com>
To:     AngeloGioacchino Del Regno 
        <angelogioacchino.delregno@...labora.com>
Cc:     Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        kernel@...labora.com,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Mathieu Poirier <mathieu.poirier@...aro.org>,
        Matthias Brugger <matthias.bgg@...il.com>,
        Rob Herring <robh+dt@...nel.org>,
        Tinghan Shen <tinghan.shen@...iatek.com>,
        devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org, linux-mediatek@...ts.infradead.org,
        linux-remoteproc@...r.kernel.org
Subject: Re: [PATCH 1/2] dt-bindings: remoteproc: mediatek: Fix optional
 reg-names for mtk,scp

On Tue, May 03, 2022 at 02:26:15PM +0200, AngeloGioacchino Del Regno wrote:
> Il 03/05/22 14:19, Krzysztof Kozlowski ha scritto:
> > On 29/04/2022 23:11, Nícolas F. R. A. Prado wrote:
> > > The SCP has three memory regions: sram, l1tcm and cfg. Only sram is
> > > required, the other two are optional. Fix the dt-binding so that the
> > > optional regions can be omitted and passed in any order.
> > 
> > No, cannot be passed in any order.
> > 
> > > 
> > > Also add the missing minItems to the reg property and update the
> > > description.
> > > 
> > > Signed-off-by: Nícolas F. R. A. Prado <nfraprado@...labora.com>
> > > 
> > > ---
> > > 
> > >   .../devicetree/bindings/remoteproc/mtk,scp.yaml      | 12 +++++++++---
> > >   1 file changed, 9 insertions(+), 3 deletions(-)
> > > 
> > > diff --git a/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml b/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml
> > > index 823a236242de..ec9ddeb6ca2c 100644
> > > --- a/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml
> > > +++ b/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml
> > > @@ -24,14 +24,20 @@ properties:
> > >     reg:
> > >       description:
> > >         Should contain the address ranges for memory regions SRAM, CFG, and
> > > -      L1TCM.
> > > +      L1TCM. Only SRAM is required, while CFG and L1TCM are optional.
> > > +    minItems: 1
> > >       maxItems: 3
> > >     reg-names:
> > > +    minItems: 1
> > >       items:
> > >         - const: sram
> > > -      - const: cfg
> > > -      - const: l1tcm
> > > +      - enum:
> > > +          - l1tcm
> > > +          - cfg
> > > +      - enum:
> > > +          - l1tcm
> > > +          - cfg
> > 
> > This allows them in any combination which is not what we want. If both
> > are optional and both can appear, then last should be a const:l1tcm.
> > 
> > Best regards,
> > Krzysztof
> 
> Nicolas, I think that you weren't clear about what you're trying to solve with this
> commit in the description.
> 
> I remember you had this kind of instance, but I don't really remember if it was
> about mtk,scp or (and?) something else.... so.... are you trying to fix issues
> with devicetrees declaring
> 
> 	reg-names = "sram", "l1tcm"; ?
> 
> Was this giving dtbs_check errors?

Hi Angelo,

yes, some devicetrees (like mt8183) have

 	reg-names = "sram", "cfg";

I'll include mention of this in the commit description for v3.

This was also supposed to fix the warning for mt8192, where the order is
different: "sram", "l1tcm", "cfg". But since Krzysztof said that we want a fixed
order, then the mt8192 DT will need to be updated. (I also just noticed that
it's just l1tcm that is optional, I was just being blind, so I'll also fix that
in v3)

Thanks,
Nícolas

> 
> Cheers,
> Angelo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ