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]
Message-Id: <20220723030226.8E43CC341C6@smtp.kernel.org>
Date:   Fri, 22 Jul 2022 20:02:24 -0700
From:   Stephen Boyd <sboyd@...nel.org>
To:     Tomer Maimon <tmaimon77@...il.com>
Cc:     Arnd Bergmann <arnd@...db.de>,
        Avi Fishman <avifishman70@...il.com>,
        Benjamin Fair <benjaminfair@...gle.com>,
        Biju Das <biju.das.jz@...renesas.com>,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        Catalin Marinas <catalin.marinas@....com>,
        Daniel Lezcano <daniel.lezcano@...aro.org>,
        Geert Uytterhoeven <geert+renesas@...der.be>,
        Greg KH <gregkh@...uxfoundation.org>,
        Jonathan Neuschäfer <j.neuschaefer@....net>,
        Jiri Slaby <jirislaby@...nel.org>,
        Joel Stanley <joel@....id.au>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Guenter Roeck <linux@...ck-us.net>,
        Lubomir Rintel <lkundrak@...sk>,
        Marcel Ziswiler <marcel.ziswiler@...adex.com>,
        Michael Turquette <mturquette@...libre.com>,
        Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@...hiba.co.jp>,
        Olof Johansson <olof@...om.net>,
        Philipp Zabel <p.zabel@...gutronix.de>,
        Robert Hancock <robert.hancock@...ian.com>,
        Rob Herring <robh+dt@...nel.org>,
        Shawn Guo <shawnguo@...nel.org>,
        Tali Perry <tali.perry1@...il.com>,
        Thomas G leixner <tglx@...utronix.de>,
        Patrick Venture <venture@...gle.com>,
        Vinod Koul <vkoul@...nel.org>, Will Deacon <will@...nel.org>,
        Wim Van Sebroeck <wim@...ux-watchdog.org>,
        Nancy Yuen <yuenn@...gle.com>,
        devicetree <devicetree@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-clk <linux-clk@...r.kernel.org>,
        SERIAL DRIVERS <linux-serial@...r.kernel.org>,
        LINUXWATCHDOG <linux-watchdog@...r.kernel.org>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v8 04/16] clk: npcm8xx: add clock controller

Quoting Tomer Maimon (2022-07-19 03:04:43)
> On Mon, 18 Jul 2022 at 22:14, Stephen Boyd <sboyd@...nel.org> wrote:
> >
> >
> > So the clk and reset driver should be the same driver, or one driver
> > should register the other and use the auxiliary bus to express the
> > relationship. That way we know that the drivers are tightly coupled and
> > aren't going to stomp over each other.
> I think it is very problematic to use the same driver for the reset
> and the clocks also because The NPCM reset driver is an old driver
> that was used also to the older NPCM BMC SoC so it will be problematic
> to use the clock and reset driver in the same space.
> indeed the reset and clocks are using the same memory region but they
> are not using the same registers, is it not enough?
> Please be aware that the NPCM reset driver is checking that it is
> using the reset registers before calling I/O functions.

To put it simply, platform device drivers should use platform device
APIs. The platform device APIs hide the fact that the firmware is ACPI
or DT or nothing at all. The usage of of_address_to_resource() is
problematic.

After converting that to platform APIs you'll get janitor style cleanups
trying to convert to devm_platform_ioremap_resource(). We'll have to
discuss this again when that happens, even if there's a comment in the
code indicating we can't reserve the IO space because there's another
driver. These problems have happened in the past, fun times!

Furthermore, in DT, reg properties aren't supposed to overlap. When that
happens it usually indicates the DT is being written to describe driver
structure instead of the IP blocks that are delivered by the hardware
engineer. In this case it sounds like a combined clk and reset IP block
because they piled all the SoC glue stuff into a register range. Are
there more features in this IO range?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ