linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Anup Patel <anup@brainfault.org>, Ulf Hansson <ulf.hansson@linaro.org>
Cc: "Rafael J . Wysocki" <rjw@rjwysocki.net>,
	"open list:THERMAL" <linux-pm@vger.kernel.org>,
	Sudeep Holla <sudeep.holla@arm.com>,
	Lorenzo Pieralisi <Lorenzo.Pieralisi@arm.com>,
	Maulik Shah <quic_mkshah@quicinc.com>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Atish Patra <atishp@rivosinc.com>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	linux-riscv <linux-riscv@lists.infradead.org>,
	"linux-kernel@vger.kernel.org List"
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] cpuidle: psci: Fix regression leading to no genpd governor
Date: Wed, 18 May 2022 20:50:15 +0200	[thread overview]
Message-ID: <CAJZ5v0i+RR2nK8gew9tbnO_VVU3YUx2JgdRTBW07EPrB3UK87g@mail.gmail.com> (raw)
In-Reply-To: <CAAhSdy3m3FzbkL-On5kPtrZgyO4x=6onr6mXi_=te5B=m_n8GQ@mail.gmail.com>

On Sat, May 14, 2022 at 6:49 PM Anup Patel <anup@brainfault.org> wrote:
>
> On Sat, May 14, 2022 at 8:50 PM Ulf Hansson <ulf.hansson@linaro.org> wrote:
> >
> > While factoring out the PM domain related code from PSCI domain driver into
> > a set of library functions, a regression when initializing the genpds got
> > introduced. More precisely, we fail to assign a genpd governor, so let's
> > fix this.
> >
> > Fixes: 9d976d6721df ("cpuidle: Factor-out power domain related code from PSCI domain driver")
> > Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
>
> Looks good to me.
>
> Reviewed-by: Anup Patel <anup@brainfault.org>
>

Ulf, do you want me to take this lot or is it going to be handled elsewhere?

> > ---
> >  drivers/cpuidle/cpuidle-psci-domain.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/cpuidle/cpuidle-psci-domain.c b/drivers/cpuidle/cpuidle-psci-domain.c
> > index 755bbdfc5b82..3db4fca1172b 100644
> > --- a/drivers/cpuidle/cpuidle-psci-domain.c
> > +++ b/drivers/cpuidle/cpuidle-psci-domain.c
> > @@ -52,7 +52,7 @@ static int psci_pd_init(struct device_node *np, bool use_osi)
> >         struct generic_pm_domain *pd;
> >         struct psci_pd_provider *pd_provider;
> >         struct dev_power_governor *pd_gov;
> > -       int ret = -ENOMEM, state_count = 0;
> > +       int ret = -ENOMEM;
> >
> >         pd = dt_idle_pd_alloc(np, psci_dt_parse_state_node);
> >         if (!pd)
> > @@ -71,7 +71,7 @@ static int psci_pd_init(struct device_node *np, bool use_osi)
> >                 pd->flags |= GENPD_FLAG_ALWAYS_ON;
> >
> >         /* Use governor for CPU PM domains if it has some states to manage. */
> > -       pd_gov = state_count > 0 ? &pm_domain_cpu_gov : NULL;
> > +       pd_gov = pd->states ? &pm_domain_cpu_gov : NULL;
> >
> >         ret = pm_genpd_init(pd, pd_gov, false);
> >         if (ret)
> > --
> > 2.25.1
> >

  reply	other threads:[~2022-05-18 18:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-14 15:20 [PATCH 1/2] cpuidle: psci: Fix regression leading to no genpd governor Ulf Hansson
2022-05-14 16:48 ` Anup Patel
2022-05-18 18:50   ` Rafael J. Wysocki [this message]
2022-05-19 13:00     ` Ulf Hansson
2022-05-19 17:38       ` Rafael J. Wysocki

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=CAJZ5v0i+RR2nK8gew9tbnO_VVU3YUx2JgdRTBW07EPrB3UK87g@mail.gmail.com \
    --to=rafael@kernel.org \
    --cc=Lorenzo.Pieralisi@arm.com \
    --cc=anup@brainfault.org \
    --cc=aou@eecs.berkeley.edu \
    --cc=atishp@rivosinc.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=quic_mkshah@quicinc.com \
    --cc=rjw@rjwysocki.net \
    --cc=sudeep.holla@arm.com \
    --cc=ulf.hansson@linaro.org \
    /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).