]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.19.34/cpufreq-acpi-cpufreq-report-if-cpu-doesn-t-support-b.patch
Linux 4.19.34
[thirdparty/kernel/stable-queue.git] / releases / 4.19.34 / cpufreq-acpi-cpufreq-report-if-cpu-doesn-t-support-b.patch
1 From 859ec1ddd6a82520744e8c25c3b1611385a1a299 Mon Sep 17 00:00:00 2001
2 From: Erwan Velu <erwanaliasr1@gmail.com>
3 Date: Wed, 20 Feb 2019 11:10:17 +0100
4 Subject: cpufreq: acpi-cpufreq: Report if CPU doesn't support boost
5 technologies
6
7 [ Upstream commit 1222d527f314c86a3b59a522115d62facc5a7965 ]
8
9 There is some rare cases where CPB (and possibly IDA) are missing on
10 processors.
11
12 This is the case fixed by commit f7f3dc00f612 ("x86/cpu/AMD: Fix
13 erratum 1076 (CPB bit)") and following.
14
15 In such context, the boost status isn't reported by
16 /sys/devices/system/cpu/cpufreq/boost.
17
18 This commit is about printing a message to report that the CPU
19 doesn't expose the boost capabilities.
20
21 This message could help debugging platforms hit by this phenomena.
22
23 Signed-off-by: Erwan Velu <e.velu@criteo.com>
24 [ rjw: Change the message text somewhat ]
25 Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
26 Signed-off-by: Sasha Levin <sashal@kernel.org>
27 ---
28 drivers/cpufreq/acpi-cpufreq.c | 4 +++-
29 1 file changed, 3 insertions(+), 1 deletion(-)
30
31 diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c
32 index b61f4ec43e06..aca30f45172e 100644
33 --- a/drivers/cpufreq/acpi-cpufreq.c
34 +++ b/drivers/cpufreq/acpi-cpufreq.c
35 @@ -911,8 +911,10 @@ static void __init acpi_cpufreq_boost_init(void)
36 {
37 int ret;
38
39 - if (!(boot_cpu_has(X86_FEATURE_CPB) || boot_cpu_has(X86_FEATURE_IDA)))
40 + if (!(boot_cpu_has(X86_FEATURE_CPB) || boot_cpu_has(X86_FEATURE_IDA))) {
41 + pr_debug("Boost capabilities not present in the processor\n");
42 return;
43 + }
44
45 acpi_cpufreq_driver.set_boost = set_boost;
46 acpi_cpufreq_driver.boost_enabled = boost_state(0);
47 --
48 2.19.1
49