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: <960b0707-f0e5-993b-3706-a7a275e0698f@collabora.com>
Date:   Fri, 23 Dec 2022 10:21:45 +0100
From:   AngeloGioacchino Del Regno 
        <angelogioacchino.delregno@...labora.com>
To:     Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
        mturquette@...libre.com
Cc:     sboyd@...nel.org, matthias.bgg@...il.com, robh+dt@...nel.org,
        krzysztof.kozlowski+dt@...aro.org, wenst@...omium.org,
        johnson.wang@...iatek.com, miles.chen@...iatek.com,
        fparent@...libre.com, chun-jie.chen@...iatek.com,
        sam.shih@...iatek.com, y.oudjana@...tonmail.com,
        nfraprado@...labora.com, rex-bc.chen@...iatek.com,
        ryder.lee@...nel.org, daniel@...rotopia.org,
        jose.exposito89@...il.com, yangyingliang@...wei.com,
        pablo.sun@...iatek.com, msp@...libre.com, weiyi.lu@...iatek.com,
        ikjn@...omium.org, linux-kernel@...r.kernel.org,
        linux-clk@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-mediatek@...ts.infradead.org, devicetree@...r.kernel.org,
        kernel@...labora.com
Subject: Re: [PATCH v1 08/25] dt-bindings: clock: mt8173: Add dummy clock ID

Il 23/12/22 09:52, Krzysztof Kozlowski ha scritto:
> On 22/12/2022 12:48, AngeloGioacchino Del Regno wrote:
>> Some old MediaTek clock drivers are starting the clock count (so, the
>> clock ID) from one instead of zero and this is logically incorrect,
>> as we should start from 0.
>> During a cleanup an issue emerged due to that and the cleanest and
>> shortest way to keep devicetree backwards compatibility while still
>> performing the well deserved cleanup is to add a dummy clock where
>> needed, with ID 0.
> 
> Unfortunately I do not understand at all why adding dummy (fake) ID
> cleans anything here. Unifying IDs to start from 0 is not an argument on
> DT bindings header IDs.
> 
> Best regards,
> Krzysztof
> 
> 

All clocks are in one or multiple arrays, and if we don't register ID 0,
devicetrees will reference the wrong clock, as the IDs will shift back by
one during registration.

This was done for a commonization of probe() and remove() callbacks for
MediaTek clock drivers... since we have 3 affected SoCs (MT8173, MT2701
and MT6779) out of *19* (soon 20), to me, it didn't make sense to write
commonized code to address this just because of 3 out of 20 SoCs (note
that each SoC has around 4 clock drivers).

Any suggestion to keep this one short, while not touching dt-bindings?

Regards,
Angelo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ