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: <87zglpybzw.wl-maz@kernel.org>
Date:   Wed, 16 Mar 2022 18:43:15 +0000
From:   Marc Zyngier <maz@...nel.org>
To:     Kuldeep Singh <singh.kuldeep87k@...il.com>
Cc:     Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>,
        Marc Zyngier <marc.zyngier@....com>,
        Mark Rutland <mark.rutland@....com>,
        Daniel Lezcano <daniel.lezcano@...aro.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        devicetree@...r.kernel.org
Subject: Re: [PATCH 3/3] clocksource: arch_timer: Add arm,cortex-a7/15-timer in of_match list

On Wed, 16 Mar 2022 17:41:08 +0000,
Kuldeep Singh <singh.kuldeep87k@...il.com> wrote:
> 
> On Wed, Mar 16, 2022 at 05:30:26PM +0100, Krzysztof Kozlowski wrote:
> > On 16/03/2022 10:54, Kuldeep Singh wrote:
> > > Few platforms such as Renesas RZ/N1D, Calxeda, Alpine etc. are using
> > > arm,cortex-a15-timer and arm,cortex-a7-timer entries in conjugation with
> > > arm,armv7-timer which are not currently defined in driver file. Add
> > > these entries in arch_timer_of_match list to bring them in use.
> > > 
> > 
> > This looks wrong (also Marc pointed this out) and rationale is not
> > sufficient. Why do you need these compatibles in the driver?
> 
> Hi Krzysztof and Marc,
> 
> I find myself in trouble whenever dealing with compatible entries and
> had 2 options when I stumble this issue.
> 	1. Remove unused compatible

That'd be silly.

> 	2. Add required compatible to binding and driver

To the binding, yes. But to the driver?

> My past experience and advise from other developer says not to remove an
> existing compatible. And also I found "arm,cortex-a15-timer" in binding
> which was again not documented and was present in DT. This prompted me
> to go for second option and make necessary additions in binding and
> driver following current entries.

The "arm,cortex-a15-timer" compatible is documentation, and only
that. If, one day, we find a bug in this implementation, we could work
around it in the driver thanks to the separate compatible (although in
this case, we'd have much better way of doing that).

> As per your perspective, current configuration isn't apt which means
> "arm,cortex-a15-timer" is a stub and is wrongly present in binding.

That's not what I said. This compatible string is perfectly fine, and
accurately describe the HW. The driver doesn't need to know about the
fine details of the implementation, and is perfectly happy with the
current state of things.

Think of it as an instance of a class. The driver doesn't need to know
the instance, only that it is a certain class.

> I also observed many other DTs have compatibles which are not present in
> driver. What is an ideal idealogy behind such cases?

I think I've made myself clear above.

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ