]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blobdiff - releases/4.14.111/cpufreq-acpi-cpufreq-report-if-cpu-doesn-t-support-b.patch
Linux 4.14.111
[thirdparty/kernel/stable-queue.git] / releases / 4.14.111 / cpufreq-acpi-cpufreq-report-if-cpu-doesn-t-support-b.patch
diff --git a/releases/4.14.111/cpufreq-acpi-cpufreq-report-if-cpu-doesn-t-support-b.patch b/releases/4.14.111/cpufreq-acpi-cpufreq-report-if-cpu-doesn-t-support-b.patch
new file mode 100644 (file)
index 0000000..d558c93
--- /dev/null
@@ -0,0 +1,49 @@
+From e4e3f7ee547a6e38f3a89816e14011724f04bb1c Mon Sep 17 00:00:00 2001
+From: Erwan Velu <erwanaliasr1@gmail.com>
+Date: Wed, 20 Feb 2019 11:10:17 +0100
+Subject: cpufreq: acpi-cpufreq: Report if CPU doesn't support boost
+ technologies
+
+[ Upstream commit 1222d527f314c86a3b59a522115d62facc5a7965 ]
+
+There is some rare cases where CPB (and possibly IDA) are missing on
+processors.
+
+This is the case fixed by commit f7f3dc00f612 ("x86/cpu/AMD: Fix
+erratum 1076 (CPB bit)") and following.
+
+In such context, the boost status isn't reported by
+/sys/devices/system/cpu/cpufreq/boost.
+
+This commit is about printing a message to report that the CPU
+doesn't expose the boost capabilities.
+
+This message could help debugging platforms hit by this phenomena.
+
+Signed-off-by: Erwan Velu <e.velu@criteo.com>
+[ rjw: Change the message text somewhat ]
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/cpufreq/acpi-cpufreq.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c
+index d0c34df0529c..51a3c15ace09 100644
+--- a/drivers/cpufreq/acpi-cpufreq.c
++++ b/drivers/cpufreq/acpi-cpufreq.c
+@@ -909,8 +909,10 @@ static void __init acpi_cpufreq_boost_init(void)
+ {
+       int ret;
+-      if (!(boot_cpu_has(X86_FEATURE_CPB) || boot_cpu_has(X86_FEATURE_IDA)))
++      if (!(boot_cpu_has(X86_FEATURE_CPB) || boot_cpu_has(X86_FEATURE_IDA))) {
++              pr_debug("Boost capabilities not present in the processor\n");
+               return;
++      }
+       acpi_cpufreq_driver.set_boost = set_boost;
+       acpi_cpufreq_driver.boost_enabled = boost_state(0);
+-- 
+2.19.1
+