summaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/pcc-cpufreq.c
diff options
context:
space:
mode:
authorLenny Szubowicz <lszubowi@redhat.com>2014-11-13 13:51:52 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-11-14 00:16:25 +0100
commit7e7e8fe69820c6fa31395dbbd8e348e3c69cd2a9 (patch)
treeadf82ec4a183d5b1b2bdb60cb6e939d32b93f878 /drivers/cpufreq/pcc-cpufreq.c
parent43f8a966e91f387eabe85d2f2d12519c218f9dd0 (diff)
downloadlinux-7e7e8fe69820c6fa31395dbbd8e348e3c69cd2a9.tar.gz
linux-7e7e8fe69820c6fa31395dbbd8e348e3c69cd2a9.tar.bz2
linux-7e7e8fe69820c6fa31395dbbd8e348e3c69cd2a9.zip
cpufreq: pcc: Enable autoload of pcc-cpufreq for ACPI processors
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> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq/pcc-cpufreq.c')
-rw-r--r--drivers/cpufreq/pcc-cpufreq.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/cpufreq/pcc-cpufreq.c b/drivers/cpufreq/pcc-cpufreq.c
index 4d2c8e861089..2a0d58959acf 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");