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>] [day] [month] [year] [list]
Date:   Tue, 8 Dec 2020 09:22:30 +0000
From:   "S.j. Wang" <shengjiu.wang@....com>
To:     Krzysztof Kozlowski <krzk@...nel.org>
CC:     "robh+dt@...nel.org" <robh+dt@...nel.org>,
        "shawnguo@...nel.org" <shawnguo@...nel.org>,
        "s.hauer@...gutronix.de" <s.hauer@...gutronix.de>,
        "kernel@...gutronix.de" <kernel@...gutronix.de>,
        "festevam@...il.com" <festevam@...il.com>,
        dl-linux-imx <linux-imx@....com>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] arm64: dts: imx8mn: Fix duplicate node name

> 
> On Tue, Dec 08, 2020 at 08:57:49AM +0000, S.j. Wang wrote:
> > > On Tue, Dec 08, 2020 at 08:44:51AM +0000, S.j. Wang wrote:
> > > > > > > >
> > > > > > > > On Mon, Dec 07, 2020 at 02:21:40PM +0100, Krzysztof
> > > > > > > > Kozlowski
> > > wrote:
> > > > > > > > > On Mon, Dec 07, 2020 at 02:53:24PM +0800, Shengjiu Wang
> wrote:
> > > > > > > > > > Error log:
> > > > > > > > > > sysfs: cannot create duplicate filename
> > > > > > > > '/bus/platform/devices/30000000.bus'
> > > > > > > > > >
> > > > > > > > > > The spba bus name is duplicate with aips bus name.
> > > > > > > > > > Refine spba bus name to fix this issue.
> > > > > > > > > >
> > > > > > > > > > Fixes: 970406eaef3a ("arm64: dts: imx8mn: Enable
> > > > > > > > > > Asynchronous Sample Rate Converter")
> > > > > > > > > > Signed-off-by: Shengjiu Wang <shengjiu.wang@....com>
> > > > > > > > > > ---
> > > > > > > > > >  arch/arm64/boot/dts/freescale/imx8mn.dtsi | 2 +-
> > > > > > > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > > > > > > >
> > > > > > > > > > diff --git a/arch/arm64/boot/dts/freescale/imx8mn.dtsi
> > > > > > > > > > b/arch/arm64/boot/dts/freescale/imx8mn.dtsi
> > > > > > > > > > index fd669c0f3fe5..30762eb4f0a7 100644
> > > > > > > > > > --- a/arch/arm64/boot/dts/freescale/imx8mn.dtsi
> > > > > > > > > > +++ b/arch/arm64/boot/dts/freescale/imx8mn.dtsi
> > > > > > > > > > @@ -246,7 +246,7 @@ aips1: bus@...00000 {
> > > > > > > > > >                     #size-cells = <1>;
> > > > > > > > > >                     ranges;
> > > > > > > > > >
> > > > > > > > > > -                   spba: bus@...00000 {
> > > > > > > > > > +                   spba: spba-bus@...00000 {
> > > > > > > > >
> > > > > > > > > The proper node name is "bus" so basically you introduce
> > > > > > > > > wrong name to other problem.  Introducing wrong names at
> > > > > > > > > least requires a
> > > > > comment.
> > > > > > > >
> > > > > > > > I just noticed that my message was barely
> > > > > > > > understandable... so let me
> > > > > fix it:
> > > > > > > >
> > > > > > > > The proper node name is "bus" so basically you introduce
> > > > > > > > wrong name to _fix_ other problem.  Introducing wrong
> > > > > > > > names at least
> > > > > requires a comment.
> > > > > > > >
> > > > > > > > > However the actual problem here is not in node names but
> > > > > > > > > in
> > > > > addresses:
> > > > > > > > >
> > > > > > > > >       aips1: bus@...00000 {
> > > > > > > > >               spba: bus@...00000 {
> > > > > > > > >
> > > > > > > > > You have to devices with the same unit address. How do
> > > > > > > > > you share the address space?
> > > > > > > > >
> > > > > > > > > I think this should be rather fixed.
> > > > > > > >
> > > > > > > > And again, hungry keyboard ate a letter, so:
> > > > > > > >
> > > > > > > > You have _two_ devices with the same unit address. How do
> > > > > > > > you share the address space?
> > > > > > > > I think this should be rather fixed.
> > > > > > > >
> > > > > > >
> > > > > > > spba is the first block of aips1 space, so it has same start
> > > > > > > address as aips1.
> > > > > >
> > > > > > The reference manual describes it "Reserved for SDMA2 internal
> > > > > > memory", so indeed it is first address but does it have to be mapped?
> > > > > > Anyway, why don't you use ranges to remove the conflict?
> > > > >
> > > > > The IO address space remapping could be a solution but there is
> > > > > another problem - the hardware representation in DT does not
> > > > > match what reference manual is saying.
> > > > >
> > > > > The AIPS bus @30000000 has several IPs:
> > > > >  - SAI2@...20000
> > > > >  - ...
> > > > >  - GPIO1@...00000
> > > > >
> > > > > However in DTS you will find additional SPBA bus for 30000000 -
> > > 300c0000.
> > > > > It's not really the SDMA, as SDMA is at different address. It is
> > > > > rather an address space which SDMA should map... but it is not a
> > > > > bus
> > > with children.
> > > > > Adding spba-bus@...00000 with its children does not look like
> > > > > correct representation of HW in DTS.
> > > > >
> > > >
> > > > In the RM, it says AIPS-1 (s_b_1, via SPBA) Glob. Module Enable.
> > > > Range is (30000000 - 300FFFFF)
> > >
> > > No, AIPS-1 is till 303F_FFFF.
> >
> > Yes,  AIPSA-1 is till 303F_FFFF,  but it is divided to 2 parts.
> > (30000000 - 300FFFFF) is the first part.
> >
> > Please go to table 2-3 AIPS1 memory map in RM.  In the "region"
> > column, There is " AIPS-1 (s_b_1, via SPBA) Glob. Module Enable". It
> > means This part is connect to SPBA bus.
> 
> Thanks, I see it now. Indeed you have two buses which start at the same
> address space. You can:
> 1. Remap addresses,
> 2. Rename APIS and SPBA to bus-1 and bus-2, 3. Add specific (non-generic)
> name to spba-bus which you did initially.
> 
> All of these are rather workarounds so I don't mind your approach (3).
> 

Thanks.
I would like to keep my approach, which is to align with other i.MX platforms.

Best regards
Wang Shengjiu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ