mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Lenny Szubowicz <lszubowi@redhat.com>
Cc: linux-kernel@vger.kernel.org,
	Viresh Kumar <viresh.kumar@linaro.org>,
	linux-pm@vger.kernel.org, Joseph.Szczypek@hp.com
Subject: Re: [PATCH] cpufreq: pcc: Enable autoload of pcc-cpufreq for ACPI processors
Date: Wed, 19 Nov 2014 00:30:32 +0100	[thread overview]
Message-ID: <2494503.pmLurATttt@vostro.rjw.lan> (raw)
In-Reply-To: <1415904712-12521-1-git-send-email-lszubowi@redhat.com>

On Thursday, November 13, 2014 01:51:52 PM Lenny Szubowicz wrote:
> The pcc-cpufreq driver is not automatically loaded on systems where
> the platform's power management setting requires this driver.
> Instead, on those systems no CPU frequency driver is registered and
> active.
> 
> Make the autoloading matching criteria for loading the pcc-cpufreq
> driver the same as done in acpi-cpufreq by commit c655affbd524d01
> ("ACPI / cpufreq: Add ACPI processor device IDs to acpi-cpufreq").
> 
> x86 CPU frequency drivers are now typically autoloaded by specifying
> MODULE_DEVICE_TABLE entries and x86cpu model specific matching.
> But pcc-cpufreq was omitted when acpi-cpufreq and other drivers were
> changed to use this approach.
> 
> Both acpi-cpufreq and pcc-cpufreq depend on a distinct and mutually
> exclusive set of ACPI methods which are not directly tied to specific
> processor model numbers. Both of these drivers have init routines
> which look for their required ACPI methods. As a result, only the
> appropriate driver registers as the cpu frequency driver and the other
> one ends up being unloaded.
> 
> Tested on various systems where acpi-cpufreq, intel_pstate, and
> pcc-cpufreq are the expected cpu frequency drivers.
> 
> Signed-off-by: Lenny Szubowicz <lszubowi@redhat.com>
> Signed-off-by: Joseph Szczypek <joseph.szczypek@hp.com>
> Reported-by: Trinh Dao <trinh.dao@hp.com>

Queued up for 3.19-rc1, thanks!

> ---
>  drivers/cpufreq/pcc-cpufreq.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/cpufreq/pcc-cpufreq.c b/drivers/cpufreq/pcc-cpufreq.c
> index 4d2c8e8..2a0d589 100644
> --- a/drivers/cpufreq/pcc-cpufreq.c
> +++ b/drivers/cpufreq/pcc-cpufreq.c
> @@ -603,6 +603,13 @@ static void __exit pcc_cpufreq_exit(void)
>  	free_percpu(pcc_cpu_info);
>  }
>  
> +static const struct acpi_device_id processor_device_ids[] = {
> +	{ACPI_PROCESSOR_OBJECT_HID, },
> +	{ACPI_PROCESSOR_DEVICE_HID, },
> +	{},
> +};
> +MODULE_DEVICE_TABLE(acpi, processor_device_ids);
> +
>  MODULE_AUTHOR("Matthew Garrett, Naga Chumbalkar");
>  MODULE_VERSION(PCC_VERSION);
>  MODULE_DESCRIPTION("Processor Clocking Control interface driver");
> 

-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

      reply	other threads:[~2014-11-18 23:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-13 18:51 Lenny Szubowicz
2014-11-18 23:30 ` Rafael J. Wysocki [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=2494503.pmLurATttt@vostro.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=Joseph.Szczypek@hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lszubowi@redhat.com \
    --cc=viresh.kumar@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

all inboxes | Powered by JetHome®