All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ionela Voinescu <ionela.voinescu@arm.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Mian Yousaf Kaukab <yousaf.kaukab@suse.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Len Brown <lenb@kernel.org>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux PM <linux-pm@vger.kernel.org>,
	Mian Yousaf Kaukab <ykaukab@suse.de>,
	Petr Cervinka <pcervinka@suse.com>
Subject: Re: [PATCH 1/2] acpi: cppc: add cpufreq device
Date: Thu, 10 Dec 2020 15:02:23 +0000	[thread overview]
Message-ID: <20201210150223.GA28824@arm.com> (raw)
In-Reply-To: <CAJZ5v0hWxLrXCS+X15hnLZ2enBsSJ0aEfnxK2kL+n9k4gkg17Q@mail.gmail.com>

Hi guys,

On Thursday 10 Dec 2020 at 15:32:09 (+0100), Rafael J. Wysocki wrote:
> On Thu, Dec 10, 2020 at 3:23 PM Mian Yousaf Kaukab
> <yousaf.kaukab@suse.com> wrote:
> >
> > From: Mian Yousaf Kaukab <ykaukab@suse.de>
> >
> > Since commit 28f06f770454 ("cppc_cpufreq: replace per-cpu structures with
> > lists"), cppc-cpufreq driver doesn't check availability of PSD data before
> > registering with cpufreq core. As a result on a ThunderX2 platform when
> > CPPC is disabled from BIOS, kernel log is spammed with following messages:
> >
> > [  180.974166] CPPC Cpufreq: Error in acquiring _CPC/_PSD data for CPUxx
> >
> > acpi_cppc_processor_probe() never succeed in this case because
> > acpi_evaluate_object_typed("_CPC") always returns AE_NOT_FOUND. When
> > cpufreq core calls cppc_cpufreq_cpu_init(), driver fails to obtain PSD data
> > and print error messages.
> >
> > Convert cppc-cpufreq driver to a platform driver (done in a separate patch)
> > and add cppc-cpufreq device when acpi_cppc_processor_probe() succeeds.
> 
> Honestly, I prefer to drop 28f06f770454 (along with its follower)
> instead of making this change.
> 
> > Fixes: 28f06f770454 ("cppc_cpufreq: replace per-cpu structures with lists")
> 

Sorry for introducing this, I though it was enough to bail out of cpu
init if _CPC entries are not present.

I'll defer to Rafael to decide whether to drop the patches or accept
alternative fixes, but I believe the rework of the data structures and
initialisation is useful.

As alternative fix, would it be okay to introduce a check function to
verify for !cpc_ptr, to be called in cppc_cpufreq_init()? In that case
the driver would not be registered if this check fails.

Thanks,
Ionela.

> Thanks!

  reply	other threads:[~2020-12-10 15:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-10 14:21 [PATCH 1/2] acpi: cppc: add cpufreq device Mian Yousaf Kaukab
2020-12-10 14:21 ` [PATCH 2/2] cpufreq: cppc: convert to a platform driver Mian Yousaf Kaukab
2020-12-10 14:32 ` [PATCH 1/2] acpi: cppc: add cpufreq device Rafael J. Wysocki
2020-12-10 15:02   ` Ionela Voinescu [this message]
2020-12-10 15:04   ` Mian Yousaf Kaukab
2020-12-10 16:55     ` Rafael J. Wysocki
2020-12-10 17:23       ` Ionela Voinescu
2020-12-10 18:54         ` 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=20201210150223.GA28824@arm.com \
    --to=ionela.voinescu@arm.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=pcervinka@suse.com \
    --cc=rafael@kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=viresh.kumar@linaro.org \
    --cc=ykaukab@suse.de \
    --cc=yousaf.kaukab@suse.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.