linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Palmer Dabbelt <palmer@dabbelt.com>
To: ulf.hansson@linaro.org
Cc: nick.hu@sifive.com, anup@brainfault.org, rafael@kernel.org,
	daniel.lezcano@linaro.org,
	Paul Walmsley <paul.walmsley@sifive.com>,
	linux-pm@vger.kernel.org, linux-riscv@lists.infradead.org,
	linux-kernel@vger.kernel.org, zong.li@sifive.com
Subject: Re: [PATCH] cpuidle: riscv-sbi: Add cluster_pm_enter()/exit()
Date: Mon, 29 Apr 2024 13:59:51 -0700 (PDT)	[thread overview]
Message-ID: <mhng-eea6b80c-4359-46d0-85d9-358bc89e9169@palmer-ri-x1c9> (raw)
In-Reply-To: <CAPDyKFph3WsZMmALnzBQKE4S_80Ji5h386Wi0vHda37QUsjMtg@mail.gmail.com>

On Mon, 29 Apr 2024 07:32:12 PDT (-0700), ulf.hansson@linaro.org wrote:
> On Mon, 26 Feb 2024 at 07:51, Nick Hu <nick.hu@sifive.com> wrote:
>>
>> When the cpus in the same cluster are all in the idle state, the kernel
>> might put the cluster into a deeper low power state. Call the
>> cluster_pm_enter() before entering the low power state and call the
>> cluster_pm_exit() after the cluster woken up.
>>
>> Signed-off-by: Nick Hu <nick.hu@sifive.com>
>
> I was not cced this patch, but noticed that this patch got queued up
> recently. Sorry for not noticing earlier.
>
> If not too late, can you please drop/revert it? We should really move
> away from the CPU cluster notifiers. See more information below.

Sorry about that, I'll toss it.  I'm testing some other stuff right now 
so it might miss today's linux-next.

>> ---
>>  drivers/cpuidle/cpuidle-riscv-sbi.c | 24 ++++++++++++++++++++++--
>>  1 file changed, 22 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/cpuidle/cpuidle-riscv-sbi.c b/drivers/cpuidle/cpuidle-riscv-sbi.c
>> index e8094fc92491..298dc76a00cf 100644
>> --- a/drivers/cpuidle/cpuidle-riscv-sbi.c
>> +++ b/drivers/cpuidle/cpuidle-riscv-sbi.c
>> @@ -394,6 +394,7 @@ static int sbi_cpuidle_pd_power_off(struct generic_pm_domain *pd)
>>  {
>>         struct genpd_power_state *state = &pd->states[pd->state_idx];
>>         u32 *pd_state;
>> +       int ret;
>>
>>         if (!state->data)
>>                 return 0;
>> @@ -401,6 +402,10 @@ static int sbi_cpuidle_pd_power_off(struct generic_pm_domain *pd)
>>         if (!sbi_cpuidle_pd_allow_domain_state)
>>                 return -EBUSY;
>>
>> +       ret = cpu_cluster_pm_enter();
>> +       if (ret)
>> +               return ret;
>
> Rather than using the CPU cluster notifiers, consumers of the genpd
> can register themselves to receive genpd on/off notifiers.
>
> In other words, none of this should be needed, right?
>
> [...]
>
> Kind regards
> Uffe

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

      parent reply	other threads:[~2024-04-29 21:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-26  6:51 [PATCH] cpuidle: riscv-sbi: Add cluster_pm_enter()/exit() Nick Hu
2024-04-28 22:00 ` patchwork-bot+linux-riscv
2024-04-29 14:32 ` Ulf Hansson
2024-04-29 16:22   ` Nick Hu
2024-04-29 16:26     ` Nick Hu
2024-04-30  8:12       ` Ulf Hansson
2024-05-14  9:50         ` Nick Hu
2024-05-14 14:23           ` Anup Patel
2024-05-14 14:54             ` Anup Patel
2024-05-15 12:15               ` Nick Hu
2024-05-15 13:45                 ` Anup Patel
2024-05-16  4:09                   ` Nick Hu
2024-05-17  4:39                     ` Anup Patel
2024-05-23  3:26                       ` Nick Hu
2024-05-24 10:41                       ` Ulf Hansson
2024-05-24 12:54                         ` Anup Patel
2024-04-29 20:59   ` Palmer Dabbelt [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=mhng-eea6b80c-4359-46d0-85d9-358bc89e9169@palmer-ri-x1c9 \
    --to=palmer@dabbelt.com \
    --cc=anup@brainfault.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=nick.hu@sifive.com \
    --cc=paul.walmsley@sifive.com \
    --cc=rafael@kernel.org \
    --cc=ulf.hansson@linaro.org \
    --cc=zong.li@sifive.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;
as well as URLs for NNTP newsgroup(s).