From: Len Brown <lenb@kernel.org>
To: H Peter Anvin <hpa@zytor.com>
Cc: Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
Dave Jones <davej@redhat.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-acpi@vger.kernel.org,
Venkatesh Pallipadi <venki@google.com>
Subject: [PATCH] x86: Look for IA32_ENERGY_PERF_BIAS support - v3
Date: Thu, 03 Jun 2010 23:22:28 -0400 (EDT) [thread overview]
Message-ID: <alpine.LFD.2.00.1006032310160.6669@localhost.localdomain> (raw)
In-Reply-To: <20100304231547.654246000@intel.com>
From: Venkatesh Pallipadi <venki@google.com>
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>
Signed-off-by: Len Brown <len.brown@intel.com>
---
lenb: v3 refreshes venki's original patch to apply to 2.6.35-rc1
arch/x86/include/asm/cpufeature.h | 1 +
arch/x86/include/asm/msr-index.h | 2 ++
arch/x86/kernel/cpu/addon_cpuid_features.c | 1 +
3 files changed, 4 insertions(+), 0 deletions(-)
Index: linus/arch/x86/include/asm/cpufeature.h
===================================================================
--- linus.orig/arch/x86/include/asm/cpufeature.h
+++ linus/arch/x86/include/asm/cpufeature.h
@@ -162,6 +162,7 @@
#define X86_FEATURE_IDA (7*32+ 0) /* Intel Dynamic Acceleration */
#define X86_FEATURE_ARAT (7*32+ 1) /* Always Running APIC Timer */
#define X86_FEATURE_CPB (7*32+ 2) /* AMD Core Performance Boost */
+#define X86_FEATURE_EPB (7*32+ 3) /* IA32_ENERGY_PERF_BIAS support */
/* Virtualization flags: Linux defined */
#define X86_FEATURE_TPR_SHADOW (8*32+ 0) /* Intel TPR Shadow */
Index: linus/arch/x86/include/asm/msr-index.h
===================================================================
--- linus.orig/arch/x86/include/asm/msr-index.h
+++ linus/arch/x86/include/asm/msr-index.h
@@ -238,6 +238,8 @@
#define MSR_IA32_TEMPERATURE_TARGET 0x000001a2
+#define MSR_IA32_ENERGY_PERF_BIAS 0x000001b0
+
/* MISC_ENABLE bits: architectural */
#define MSR_IA32_MISC_ENABLE_FAST_STRING (1ULL << 0)
#define MSR_IA32_MISC_ENABLE_TCC (1ULL << 1)
Index: linus/arch/x86/kernel/cpu/addon_cpuid_features.c
===================================================================
--- linus.orig/arch/x86/kernel/cpu/addon_cpuid_features.c
+++ linus/arch/x86/kernel/cpu/addon_cpuid_features.c
@@ -33,6 +33,7 @@ void __cpuinit init_scattered_cpuid_feat
{ X86_FEATURE_IDA, CR_EAX, 1, 0x00000006 },
{ X86_FEATURE_ARAT, CR_EAX, 2, 0x00000006 },
{ X86_FEATURE_APERFMPERF, CR_ECX, 0, 0x00000006 },
+ { X86_FEATURE_EPB, CR_ECX, 3, 0x00000006 },
{ X86_FEATURE_CPB, CR_EDX, 9, 0x80000007 },
{ X86_FEATURE_NPT, CR_EDX, 0, 0x8000000a },
{ X86_FEATURE_LBRV, CR_EDX, 1, 0x8000000a },
next prev parent reply other threads:[~2010-06-04 3:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-04 23:14 [patch 0/2] Support for IA32_ENERGY_PERF_BIAS MSR - v2 venkatesh.pallipadi
2010-03-04 23:14 ` [patch 1/2] x86: Look for IA32_ENERGY_PERF_BIAS support " venkatesh.pallipadi
2010-06-04 3:22 ` Len Brown [this message]
2010-03-04 23:14 ` [patch 2/2] x86: Manage ENERGY_PERF_BIAS based on cpufreq governor " venkatesh.pallipadi
2010-03-04 23:27 ` Dave Jones
2010-03-04 23:34 ` Pallipadi, Venkatesh
2010-06-04 3:38 ` Len Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.2.00.1006032310160.6669@localhost.localdomain \
--to=lenb@kernel.org \
--cc=davej@redhat.com \
--cc=hpa@zytor.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--cc=venki@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox