Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Lukasz Luba <lukasz.luba@arm.com>
To: Chandrasekhar L <clingutla@codeaurora.org>
Cc: rafael.j.wysocki@intel.com, qperret@google.com,
	daniel.lezcano@linaro.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH] PM: EM: do not allow pd creation prior to debugfs initialization
Date: Wed, 20 Oct 2021 13:54:04 +0100	[thread overview]
Message-ID: <c2d9dfa8-d7ac-d9ca-fab8-3d93c6a9e0bc@arm.com> (raw)
In-Reply-To: <0c42bec7-4358-a8d6-b1db-f52218a8e59a@codeaurora.org>



On 10/20/21 1:03 PM, Chandrasekhar L wrote:
> Thanks Lukasz for comment.
> For any reason (ex: HW dependency, etc), if  init_call level of cpufreq/devfreq driver changed
> prior to fs_init call, we would land there right?

It's not the same triggering point, so we should be safe.

> 
> One of such example is, 'drivers/cpufreq/qcom-cpufreq-hw.c' uses postcore_initcall().

It uses the postcore_initcall to probe and register a driver into
the cpufreq framework. Then the cpufreq framework later constructs the
'policy' and calls your cpufreq_driver::init() function that your
driver provided during registration. Thus, these are two different
phases. It used to be true that if a driver required to use an
'advanced' EM registration with custom private 'em_data_callback',
we put the registration call into that .init() code [1] (old [2]).
Recently Viresh added a dedicated callback for this, which IMO
is good and avoids confusion where to put that custom registration
code.

In your driver code, there is also this callback but using a
generic function [3]. It's a 'simple' EM, which is based on OPP
framework helper. A few drivers use that option, if their platform
doesn't need the 'advanced' EM (but that's not in $subject).

Regards,
Lukasz


[1] 
https://elixir.bootlin.com/linux/v5.15-rc1/source/drivers/cpufreq/scmi-cpufreq.c#L249
[2] 
https://elixir.bootlin.com/linux/v5.14/source/drivers/cpufreq/scmi-cpufreq.c#L192
[3] 
https://elixir.bootlin.com/linux/v5.15-rc6/source/drivers/cpufreq/qcom-cpufreq-hw.c#L561

      reply	other threads:[~2021-10-20 12:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-19 15:28 [PATCH] PM: EM: do not allow pd creation prior to debugfs initialization Lingutla Chandrasekhar
2021-10-19 17:05 ` Lukasz Luba
2021-10-20 12:03   ` Chandrasekhar L
2021-10-20 12:54     ` Lukasz Luba [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=c2d9dfa8-d7ac-d9ca-fab8-3d93c6a9e0bc@arm.com \
    --to=lukasz.luba@arm.com \
    --cc=clingutla@codeaurora.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=qperret@google.com \
    --cc=rafael.j.wysocki@intel.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