summaryrefslogtreecommitdiffstats
path: root/patches/boot_time_opt/0124-tweak-perfbias.patch
blob: 56a28656ab69b7a10b2c7ed56fbdab347b1df0d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From 03e2c414a860264511dae5bbfc6d7e62b8b94f0f Mon Sep 17 00:00:00 2001
From: Arjan van de Ven <arjan@linux.intel.com>
Date: Sun, 22 Jan 2017 18:51:13 +0000
Subject: [PATCH 124/124] tweak perfbias

---
 arch/x86/kernel/cpu/intel.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c
index fcd484d2bb03..13ae40f10bd4 100644
--- a/arch/x86/kernel/cpu/intel.c
+++ b/arch/x86/kernel/cpu/intel.c
@@ -434,12 +434,12 @@ static void init_intel_energy_perf(struct cpuinfo_x86 *c)
 		return;
 
 	rdmsrl(MSR_IA32_ENERGY_PERF_BIAS, epb);
-	if ((epb & 0xF) != ENERGY_PERF_BIAS_PERFORMANCE)
+	if ((epb & 0xF) >= ENERGY_PERF_BIAS_NORMAL)
 		return;
 
-	pr_warn_once("ENERGY_PERF_BIAS: Set to 'normal', was 'performance'\n");
+	pr_warn_once("ENERGY_PERF_BIAS: Set to 'performance', was 'normal'\n");
 	pr_warn_once("ENERGY_PERF_BIAS: View and update with x86_energy_perf_policy(8)\n");
-	epb = (epb & ~0xF) | ENERGY_PERF_BIAS_NORMAL;
+	epb = (epb & ~0xF) | ENERGY_PERF_BIAS_PERFORMANCE;
 	wrmsrl(MSR_IA32_ENERGY_PERF_BIAS, epb);
 }
 
-- 
2.11.1