Linux Power Management development
 help / color / mirror / Atom feed
From: Javier Martinez Canillas <javierm@redhat.com>
To: Maxime Ripard <mripard@kernel.org>
Cc: Radu Rendec <rrendec@redhat.com>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	robh@kernel.org, arnd@linaro.org, linux-kernel@vger.kernel.org,
	Zhipeng Wang <zhipeng.wang_1@nxp.com>,
	javier@dowhile0.org, "Rafael J. Wysocki" <rafael@kernel.org>,
	linux-pm@vger.kernel.org
Subject: Re: [RFC PATCH] cpufreq: dt-platdev: Fix module autoloading
Date: Mon, 25 Nov 2024 10:22:30 +0100	[thread overview]
Message-ID: <877c8r4qi1.fsf@minerva.mail-host-address-is-not-set> (raw)
In-Reply-To: <20241125-eminent-devious-zebu-ec2caf@houat>

Maxime Ripard <mripard@kernel.org> writes:

Hello Maxime,

> On Fri, Nov 22, 2024 at 06:09:16PM +0100, Javier Martinez Canillas wrote:

[...]

>> > FWIW, the OPP table is defined at the top of r8a779f0.dtsi and
>> > referenced just a few more lines below, where the CPU nodes are
>> > defined.
>> >
>> > As far as I understand, there are two options to fix this:
>> >    1. Revert the patch that allows the cpufreq-dt-platdev driver to be
>> >       built as a module. There's little benefit in allowing that anyway
>> >       because the overhead at init time is minimal when the driver is
>> >       unused, and driver can't be unloaded.
>> >    2. Modify the driver and create an explicit of_device_id table of
>> >       supported platforms for v2 too (like the existing one for v1) and
>> >       use that instead of the cpu0_node_has_opp_v2_prop() call and the
>> >       blacklist. That would of course also eliminate the blacklist.
>> >
>> 
>> Agreed with this. Likely (1) is the easiest path and (2) would make the
>> driver more aligned with the rest of the kernel (that have a list of OF
>> device IDs to autoload / match instead of some custom logic).
>> 
>> But I guess that (2) would be riskier, since not adding a platform that
>> uses v2 will cause a regression.
>
> Also, 2 probably wouldn't work. Devices under /cpus don't get a struct
> device created for them, so it wouldn't probe.
>

Yeah, but the cpufreq-dt-platdev driver has a of_device_id table for the
OPPv1 that matches the actual SoC, not the cpu device nodes.

So for (2) I was thinking to do the same. But yes, agreed tha (1) is the
best option here.

> Maxime

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


      reply	other threads:[~2024-11-25  9:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-19 11:18 [RFC PATCH] cpufreq: dt-platdev: Fix module autoloading Javier Martinez Canillas
2024-11-21  7:11 ` Viresh Kumar
2024-11-21  8:52   ` Javier Martinez Canillas
2024-11-21  9:03     ` Viresh Kumar
2024-11-21  9:13       ` Javier Martinez Canillas
2024-11-22 16:16         ` Radu Rendec
2024-11-22 17:09           ` Javier Martinez Canillas
2024-11-25  5:15             ` Viresh Kumar
2024-11-25  7:43               ` Javier Martinez Canillas
2024-11-25  9:01             ` Maxime Ripard
2024-11-25  9:22               ` Javier Martinez Canillas [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877c8r4qi1.fsf@minerva.mail-host-address-is-not-set \
    --to=javierm@redhat.com \
    --cc=arnd@linaro.org \
    --cc=javier@dowhile0.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mripard@kernel.org \
    --cc=rafael@kernel.org \
    --cc=robh@kernel.org \
    --cc=rrendec@redhat.com \
    --cc=viresh.kumar@linaro.org \
    --cc=zhipeng.wang_1@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox