From: tip-bot for Fenghua Yu <fenghua.yu@intel.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
fenghua.yu@intel.com, tglx@linutronix.de, hpa@linux.intel.com,
len.brown@intel.com
Subject: [tip:x86/cpu] x86, cpu: Package Level Thermal Control, Power Limit Notification definitions
Date: Fri, 30 Jul 2010 23:33:50 GMT [thread overview]
Message-ID: <tip-9792db6174d9927700ed288e6d74b9391bf785d1@git.kernel.org> (raw)
In-Reply-To: <1280448826-12004-2-git-send-email-fenghua.yu@intel.com>
Commit-ID: 9792db6174d9927700ed288e6d74b9391bf785d1
Gitweb: http://git.kernel.org/tip/9792db6174d9927700ed288e6d74b9391bf785d1
Author: Fenghua Yu <fenghua.yu@intel.com>
AuthorDate: Thu, 29 Jul 2010 17:13:42 -0700
Committer: H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Fri, 30 Jul 2010 16:15:32 -0700
x86, cpu: Package Level Thermal Control, Power Limit Notification definitions
Add package level thermal and power limit feature support.
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.
This patch also fixes a bug which defines reverse THERM_INT_LOW_ENABLE bit and
THERM_INT_HIGH_ENABLE bit.
[ hpa: fixed up against current tip:x86/cpu ]
Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
LKML-Reference: <1280448826-12004-2-git-send-email-fenghua.yu@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
---
arch/x86/include/asm/cpufeature.h | 2 ++
arch/x86/include/asm/msr-index.h | 17 +++++++++++++++--
arch/x86/kernel/cpu/scattered.c | 2 ++
3 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h
index 4be50dd..817aa31 100644
--- a/arch/x86/include/asm/cpufeature.h
+++ b/arch/x86/include/asm/cpufeature.h
@@ -166,6 +166,8 @@
#define X86_FEATURE_CPB (7*32+ 2) /* AMD Core Performance Boost */
#define X86_FEATURE_EPB (7*32+ 3) /* IA32_ENERGY_PERF_BIAS support */
#define X86_FEATURE_XSAVEOPT (7*32+ 4) /* Optimized Xsave */
+#define X86_FEATURE_PLN (7*32+ 5) /* Intel Power Limit Notification */
+#define X86_FEATURE_PTS (7*32+ 6) /* Intel Package Thermal Status */
/* Virtualization flags: Linux defined, word 8 */
#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 7cc4a02..4ea2a7c 100644
--- a/arch/x86/include/asm/msr-index.h
+++ b/arch/x86/include/asm/msr-index.h
@@ -224,12 +224,14 @@
#define MSR_IA32_THERM_CONTROL 0x0000019a
#define MSR_IA32_THERM_INTERRUPT 0x0000019b
-#define THERM_INT_LOW_ENABLE (1 << 0)
-#define THERM_INT_HIGH_ENABLE (1 << 1)
+#define THERM_INT_HIGH_ENABLE (1 << 0)
+#define THERM_INT_LOW_ENABLE (1 << 1)
+#define THERM_INT_PLN_ENABLE (1 << 24)
#define MSR_IA32_THERM_STATUS 0x0000019c
#define THERM_STATUS_PROCHOT (1 << 0)
+#define THERM_STATUS_POWER_LIMIT (1 << 10)
#define MSR_THERM2_CTL 0x0000019d
@@ -241,6 +243,17 @@
#define MSR_IA32_ENERGY_PERF_BIAS 0x000001b0
+#define MSR_IA32_PACKAGE_THERM_STATUS 0x000001b1
+
+#define PACKAGE_THERM_STATUS_PROCHOT (1 << 0)
+#define PACKAGE_THERM_STATUS_POWER_LIMIT (1 << 10)
+
+#define MSR_IA32_PACKAGE_THERM_INTERRUPT 0x000001b2
+
+#define PACKAGE_THERM_INT_HIGH_ENABLE (1 << 0)
+#define PACKAGE_THERM_INT_LOW_ENABLE (1 << 1)
+#define PACKAGE_THERM_INT_PLN_ENABLE (1 << 24)
+
/* 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/scattered.c b/arch/x86/kernel/cpu/scattered.c
index 9815364..34b4dad 100644
--- a/arch/x86/kernel/cpu/scattered.c
+++ b/arch/x86/kernel/cpu/scattered.c
@@ -33,6 +33,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, 0 },
{ X86_FEATURE_ARAT, CR_EAX, 2, 0x00000006, 0 },
+ { X86_FEATURE_PLN, CR_EAX, 4, 0x00000006, 0 },
+ { X86_FEATURE_PTS, CR_EAX, 6, 0x00000006, 0 },
{ X86_FEATURE_APERFMPERF, CR_ECX, 0, 0x00000006, 0 },
{ X86_FEATURE_EPB, CR_ECX, 3, 0x00000006, 0 },
{ X86_FEATURE_XSAVEOPT, CR_EAX, 0, 0x0000000d, 1 },
next prev parent reply other threads:[~2010-07-30 23:34 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-30 0:13 [PATCH V3 0/5] Package Level Thermal Control and Power Limit Notification Fenghua Yu
2010-07-30 0:13 ` [PATCH V3 1/5] Package Level Thermal Control and Power Limit Notification: enable features Fenghua Yu
2010-07-30 23:33 ` tip-bot for Fenghua Yu [this message]
2010-07-30 0:13 ` [PATCH V3 2/5] Package Level Thermal Control and Power Limit Notification: pkgtemp hwmon driver Fenghua Yu
2010-07-31 0:57 ` H. Peter Anvin
2010-07-31 1:13 ` Guenter Roeck
2010-07-31 3:04 ` H. Peter Anvin
2010-07-31 2:22 ` Fenghua Yu
2010-07-30 0:13 ` [PATCH V3 3/5] Package Level Thermal Control and Power Limit Notification: thermal throttling handler Fenghua Yu
2010-08-04 0:01 ` [tip:x86/hwmon] x86, hwmon: Package Level Thermal/Power: " tip-bot for Fenghua Yu
2010-07-30 0:13 ` [PATCH V3 4/5] Package Level Thermal Control and Power Limit Notification: power limit Fenghua Yu
2010-08-04 0:01 ` [tip:x86/hwmon] x86, hwmon: Package Level Thermal/Power: " tip-bot for Fenghua Yu
2010-07-30 0:13 ` [PATCH V3 5/5] Package Level Thermal Control and Power Limit Notification: pkgtemp doc Fenghua Yu
2010-08-04 0:01 ` [tip:x86/hwmon] x86, hwmon: Package Level Thermal/Power: pkgtemp documentation tip-bot for Fenghua Yu
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=tip-9792db6174d9927700ed288e6d74b9391bf785d1@git.kernel.org \
--to=fenghua.yu@intel.com \
--cc=hpa@linux.intel.com \
--cc=hpa@zytor.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.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