Skip to content

Commit 23016bf

Browse files
Venkatesh PallipadiH. Peter Anvin
authored andcommitted
x86: Look for IA32_ENERGY_PERF_BIAS support
The new IA32_ENERGY_PERF_BIAS MSR allows system software to give hardware a hint whether OS policy favors more power saving, or more performance. This allows the OS to have some influence on internal hardware power/performance tradeoffs where the OS has previously had no influence. The support for this feature is indicated by CPUID.06H.ECX.bit3, as documented in the Intel Architectures Software Developer's Manual. This patch discovers support of this feature and displays it as "epb" in /proc/cpuinfo. Signed-off-by: Venkatesh Pallipadi <venki@google.com> LKML-Reference: <alpine.LFD.2.00.1006032310160.6669@localhost.localdomain> Signed-off-by: Len Brown <len.brown@intel.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
1 parent 12d8a96 commit 23016bf

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

arch/x86/include/asm/cpufeature.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@
162162
#define X86_FEATURE_IDA (7*32+ 0) /* Intel Dynamic Acceleration */
163163
#define X86_FEATURE_ARAT (7*32+ 1) /* Always Running APIC Timer */
164164
#define X86_FEATURE_CPB (7*32+ 2) /* AMD Core Performance Boost */
165+
#define X86_FEATURE_EPB (7*32+ 3) /* IA32_ENERGY_PERF_BIAS support */
165166

166167
/* Virtualization flags: Linux defined */
167168
#define X86_FEATURE_TPR_SHADOW (8*32+ 0) /* Intel TPR Shadow */

arch/x86/include/asm/msr-index.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,8 @@
238238

239239
#define MSR_IA32_TEMPERATURE_TARGET 0x000001a2
240240

241+
#define MSR_IA32_ENERGY_PERF_BIAS 0x000001b0
242+
241243
/* MISC_ENABLE bits: architectural */
242244
#define MSR_IA32_MISC_ENABLE_FAST_STRING (1ULL << 0)
243245
#define MSR_IA32_MISC_ENABLE_TCC (1ULL << 1)

arch/x86/kernel/cpu/addon_cpuid_features.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ void __cpuinit init_scattered_cpuid_features(struct cpuinfo_x86 *c)
3333
{ X86_FEATURE_IDA, CR_EAX, 1, 0x00000006 },
3434
{ X86_FEATURE_ARAT, CR_EAX, 2, 0x00000006 },
3535
{ X86_FEATURE_APERFMPERF, CR_ECX, 0, 0x00000006 },
36+
{ X86_FEATURE_EPB, CR_ECX, 3, 0x00000006 },
3637
{ X86_FEATURE_CPB, CR_EDX, 9, 0x80000007 },
3738
{ X86_FEATURE_NPT, CR_EDX, 0, 0x8000000a },
3839
{ X86_FEATURE_LBRV, CR_EDX, 1, 0x8000000a },

0 commit comments

Comments
 (0)