[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e7cd7252-9cc6-0970-b0e2-35fccde45e86@linaro.org>
Date: Fri, 17 Mar 2023 10:01:44 +0100
From: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To: Herbert Xu <herbert@...dor.apana.org.au>
Cc: "David S. Miller" <davem@...emloft.net>,
Nicolas Ferre <nicolas.ferre@...rochip.com>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Claudiu Beznea <claudiu.beznea@...rochip.com>,
linux-crypto@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] crypto - img-hash: Drop of_match_ptr for ID table
On 17/03/2023 09:30, Herbert Xu wrote:
> On Fri, Mar 17, 2023 at 09:12:05AM +0100, Krzysztof Kozlowski wrote:
>>
>> The missing dependency on OF is not a problem. The OF code is prepare
>> and will work fine if the driver is built with !OF. The point is that
>> with !OF after dropping of_match_ptr(), the driver could match via ACPI
>> (PRP0001). If we make it depending on OF, the driver won't be able to
>> use it, unless kernel is built with OF which is unlikely for ACPI systems.
>
> I know it works now, but what I'm saying is that if struct device_driver
> actually had of_match_table as conditional on OF, which ideally it
> should, then removing of_match_ptr will break the build.
>
> I know that it's currently unconditionally defined, but that's
> just wasting memory on non-OF machines such as x86.
That's not true. There is no waste because having it on x86 allows to
match via ACPI PRP0001. It's on purpose there.
> So either this driver is OF-only, in which case you can drop
> the of_match_ptr but must add a dependency on OF. Or it's not
> OF-only, in which case you should use of_match_ptr.
There are OF-drivers used on ACPI and x86/arm64.
The true question is whether this device will be ever used on ACPI via
PRP0001, but you are not referring to this?
Best regards,
Krzysztof
Powered by blists - more mailing lists