summaryrefslogtreecommitdiff
path: root/drivers/cpufreq/pcc-cpufreq.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-07-25 14:28:01 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-07-25 14:28:01 +0300
commit6e926363fc0071e6dc33349dedd97f28e9a2e464 (patch)
tree10adbe3f94b1f32a37095b63b03c443cc685816a /drivers/cpufreq/pcc-cpufreq.c
parent95d6c0857e54b788982746071130d822a795026b (diff)
parenteea033d07543a177fc2ab35a6d633b2aa9684b0f (diff)
downloadlinux-6e926363fc0071e6dc33349dedd97f28e9a2e464.tar.xz
Merge back cpufreq material for 4.19.
Diffstat (limited to 'drivers/cpufreq/pcc-cpufreq.c')
-rw-r--r--drivers/cpufreq/pcc-cpufreq.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/cpufreq/pcc-cpufreq.c b/drivers/cpufreq/pcc-cpufreq.c
index 0c56c9759672..099a849396f6 100644
--- a/drivers/cpufreq/pcc-cpufreq.c
+++ b/drivers/cpufreq/pcc-cpufreq.c
@@ -593,6 +593,15 @@ static int __init pcc_cpufreq_init(void)
return ret;
}
+ if (num_present_cpus() > 4) {
+ pcc_cpufreq_driver.flags |= CPUFREQ_NO_AUTO_DYNAMIC_SWITCHING;
+ pr_err("%s: Too many CPUs, dynamic performance scaling disabled\n",
+ __func__);
+ pr_err("%s: Try to enable another scaling driver through BIOS settings\n",
+ __func__);
+ pr_err("%s: and complain to the system vendor\n", __func__);
+ }
+
ret = cpufreq_register_driver(&pcc_cpufreq_driver);
return ret;