From: Fenghua Yu <fenghua.yu@intel.com>
To: Ingo Molnar <mingo@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@linux.intel.com>,
"Brown, Len" <len.brown@intel.com>,
Chen Gong <gong.chen@linux.intel.com>,
Jean Delvare <khali@linux-fr.org>,
Guenter Roeck <guenter.roeck@ericsson.com>,
Huaxu Wan <huaxu.wan@intel.com>
Cc: lkml <linux-kernel@vger.kernel.org>, lm-sensors@lm-sensors.org
Subject: [PATCH 1/5] Package Level Thermal Control and Power Limit Notification: feature enabling
Date: Thu, 22 Jul 2010 09:21:48 -0700 [thread overview]
Message-ID: <20100722162148.GA21470@linux-os.sc.intel.com> (raw)
In-Reply-To: <4C485DF1.5050407@linux.intel.com>
Add package level thermal and power limit feature support in the kernel.
The two MSRs and features are new starting with Intel's Sandy Bridge processor.
Please check Intel 64 and IA-32 Architectures SDMV Vol 3A 14.5.6 Power Limit
Notification and 14.6 Package Level Thermal Management.
Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
---
include/asm/cpufeature.h | 2 ++
include/asm/msr-index.h | 3 +++
kernel/cpu/addon_cpuid_features.c | 2 ++
3 files changed, 7 insertions(+)
diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h
index 4681459..79517b5 100644
--- a/arch/x86/include/asm/cpufeature.h
+++ b/arch/x86/include/asm/cpufeature.h
@@ -162,6 +162,8 @@
#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_PLN (7*32+ 3) /* Intel Power Limit Notification */
+#define X86_FEATURE_PTS (7*32+ 4) /* Intel Package Thermal Status */
/* Virtualization flags: Linux defined */
#define X86_FEATURE_TPR_SHADOW (8*32+ 0) /* Intel TPR Shadow */
diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h
index 8c7ae43..5eaad6f 100644
--- a/arch/x86/include/asm/msr-index.h
+++ b/arch/x86/include/asm/msr-index.h
@@ -239,6 +239,9 @@
#define MSR_IA32_TEMPERATURE_TARGET 0x000001a2
+#define MSR_IA32_PACKAGE_THERM_STATUS 0x000001b1
+#define MSR_IA32_PACKAGE_THERM_INTERRUPT 0x000001b2
+
/* MISC_ENABLE bits: architectural */
#define MSR_IA32_MISC_ENABLE_FAST_STRING (1ULL << 0)
#define MSR_IA32_MISC_ENABLE_TCC (1ULL << 1)
diff --git a/arch/x86/kernel/cpu/addon_cpuid_features.c b/arch/x86/kernel/cpu/addon_cpuid_features.c
index 10fa568..c1f4b98 100644
--- a/arch/x86/kernel/cpu/addon_cpuid_features.c
+++ b/arch/x86/kernel/cpu/addon_cpuid_features.c
@@ -32,6 +32,8 @@ void __cpuinit init_scattered_cpuid_features(struct cpuinfo_x86 *c)
static const struct cpuid_bit __cpuinitconst cpuid_bits[] = {
{ X86_FEATURE_IDA, CR_EAX, 1, 0x00000006 },
{ X86_FEATURE_ARAT, CR_EAX, 2, 0x00000006 },
+ { X86_FEATURE_PLN, CR_EAX, 4, 0x00000006 },
+ { X86_FEATURE_PTS, CR_EAX, 6, 0x00000006 },
{ X86_FEATURE_APERFMPERF, CR_ECX, 0, 0x00000006 },
{ X86_FEATURE_CPB, CR_EDX, 9, 0x80000007 },
{ X86_FEATURE_NPT, CR_EDX, 0, 0x8000000a },
next parent reply other threads:[~2010-07-22 16:21 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <94E56C79ECC49A4B87113985F1FEBA8D03F8AE2A4B@bgsmsx502.gar.corp.intel.com>
[not found] ` <4C485DF1.5050407@linux.intel.com>
2010-07-22 16:21 ` Fenghua Yu [this message]
2010-07-22 16:21 ` [PATCH 2/5] Package Level Thermal Control and Power Limit Notification: pkgtemp hwmon driver Fenghua Yu
2010-07-22 16:22 ` [PATCH 3/5] Package Level Thermal Control and Power Limit Notification: thermal throttling Fenghua Yu
2010-07-22 16:22 ` [PATCH 4/5] Package Level Thermal Control and Power Limit Notification: power limit notification Fenghua Yu
2010-07-22 16:22 ` [PATCH 5/5] Package Level Thermal Control and Power Limit Notification: pkgtemp doc Fenghua Yu
2010-07-22 17:27 ` Guenter Roeck
2010-07-22 17:52 ` Fenghua Yu
2010-07-22 18:58 ` Guenter Roeck
2010-07-22 21:21 ` Fenghua Yu
2010-08-19 15:46 ` Jean Delvare
2010-08-19 16:27 ` Guenter Roeck
2010-08-19 20:51 ` Fenghua Yu
2010-08-19 21:06 ` Guenter Roeck
2010-08-20 8:33 ` Jean Delvare
2010-08-20 16:58 ` Fenghua Yu
2010-08-20 18:39 ` H. Peter Anvin
2010-08-21 10:02 ` Jean Delvare
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=20100722162148.GA21470@linux-os.sc.intel.com \
--to=fenghua.yu@intel.com \
--cc=gong.chen@linux.intel.com \
--cc=guenter.roeck@ericsson.com \
--cc=hpa@linux.intel.com \
--cc=huaxu.wan@intel.com \
--cc=khali@linux-fr.org \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lm-sensors@lm-sensors.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).