public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jaswinder Singh Rajput <jaswinder@kernel.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: "H. Peter Anvin" <hpa@kernel.org>,
	Robert Richter <robert.richter@amd.com>,
	x86 maintainers <x86@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH 5/15 -tip] x86: Add cpufeature for Hard and Soft Poweron configuration
Date: Mon, 11 May 2009 22:18:43 +0530	[thread overview]
Message-ID: <1242060523.5139.15.camel@ht.satnam> (raw)
In-Reply-To: <1242060301.5139.13.camel@ht.satnam>


X86_FEATURE_HARD_POWERON : Hard Poweron configuration MSR_EBL_CR_POWERON

X86_FEATURE_SOFT_POWERON : Soft Poweron configuration MSR_EBC_SOFT_POWERON
                         : Frequency configuration MSR_EBC_FREQUENCY_ID

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
---
 arch/x86/include/asm/cpufeature.h |    2 ++
 arch/x86/kernel/cpu/intel.c       |   33 +++++++++++++++++++++++++++++++++
 2 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h
index da88aa0..97e54ad 100644
--- a/arch/x86/include/asm/cpufeature.h
+++ b/arch/x86/include/asm/cpufeature.h
@@ -158,6 +158,8 @@
 #define X86_FEATURE_MICROCODE	(7*32+ 3) /* Microcode update		*/
 #define X86_FEATURE_CACHE	(7*32+ 4) /* BBL_CR_* MSRs (PII & PIII)	*/
 #define X86_FEATURE_CACHE_CTL	(7*32+ 5) /* Cache control MSRs		*/
+#define X86_FEATURE_HARD_POWERON (7*32+ 6) /* Hard Poweron configuration*/
+#define X86_FEATURE_SOFT_POWERON (7*32+ 7) /* Soft Poweron configuration*/
 
 /* Virtualization flags: Linux defined */
 #define X86_FEATURE_TPR_SHADOW  (8*32+ 0) /* Intel TPR Shadow */
diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c
index cb198ed..239048d 100644
--- a/arch/x86/kernel/cpu/intel.c
+++ b/arch/x86/kernel/cpu/intel.c
@@ -394,8 +394,15 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c)
 	/* Set cpufeatures for miscellaneous MSRs			*/
 	if (c->x86 == 6) {
 		switch (c->x86_model) {
+		case 1:					/* Pentium Pro	*/
+			/* Hard Poweron configuration MSR_EBL_CR_POWERON*/
+			set_cpu_cap(c, X86_FEATURE_HARD_POWERON);
+			break;
+
 		case 3: case 5:				/* Pentium II	*/
 		case 7: case 8: case 0xA: case 0xB:	/* Pentium III	*/
+			/* Hard Poweron configuration MSR_EBL_CR_POWERON*/
+			set_cpu_cap(c, X86_FEATURE_HARD_POWERON);
 			/* BBL_CR_* MSRs (Pentium II & III processors)	*/
 			set_cpu_cap(c, X86_FEATURE_CACHE);
 			/* BBL_CR_CTL* MSRs (Cache control MSRs)	*/
@@ -406,11 +413,37 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c)
 		case 0xE:				/* Core		*/
 		case 0xF: case 0x17:			/* Core 2	*/
 		case 0x1C:				/* ATOM		*/
+			/* Hard Poweron configuration MSR_EBL_CR_POWERON*/
+			set_cpu_cap(c, X86_FEATURE_HARD_POWERON);
 			/* BBL_CR_CTL* MSRs (Cache control MSRs)	*/
 			set_cpu_cap(c, X86_FEATURE_CACHE_CTL);
 			break;
+
+		case 0x16:				/* Celeron Core	*/
+			/* Hard Poweron configuration MSR_EBL_CR_POWERON*/
+			set_cpu_cap(c, X86_FEATURE_HARD_POWERON);
+			break;
+
+		case 0x1D:				/* Xeon MP	*/
+			/* Hard Poweron configuration MSR_EBL_CR_POWERON*/
+			set_cpu_cap(c, X86_FEATURE_HARD_POWERON);
+			/*
+			 * Soft Poweron configuration MSR_EBC_SOFT_POWERON
+			 * Frequency configuration MSR_EBC_FREQUENCY_ID
+			 */
+			set_cpu_cap(c, X86_FEATURE_SOFT_POWERON);
+			break;
 		}
 	}
+	if (c->x86 == 0xF) {
+		/* Hard Poweron configuration MSR_EBL_CR_POWERON	*/
+		set_cpu_cap(c, X86_FEATURE_HARD_POWERON);
+		/*
+		 * Soft Poweron configuration MSR_EBC_SOFT_POWERON
+		 * Frequency configuration MSR_EBC_FREQUENCY_ID
+		 */
+		set_cpu_cap(c, X86_FEATURE_SOFT_POWERON);
+	}
 }
 
 #ifdef CONFIG_X86_32
-- 
1.6.0.6




  reply	other threads:[~2009-05-11 17:00 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-11 16:14 [git-pull -tip] x86: Addition of cpufeatures to friendly access miscellaneous MSRs Jaswinder Singh Rajput
2009-05-11 16:29 ` Robert Richter
2009-05-11 16:41 ` [PATCH 1/15 -tip] x86: Add cpufeature for Processor Name Jaswinder Singh Rajput
2009-05-11 16:43   ` [PATCH 2/15 -tip] x86: Add cpufeatures for Advanced Power Management Jaswinder Singh Rajput
2009-05-11 16:44     ` [PATCH 3/15 -tip] x86: Add cpufeature for Microcode update Jaswinder Singh Rajput
2009-05-11 16:45       ` [PATCH 4/15 -tip] x86: Add cpufeature for Cache MSRs Jaswinder Singh Rajput
2009-05-11 16:48         ` Jaswinder Singh Rajput [this message]
2009-05-11 16:49           ` [PATCH 6/15 -tip] x86: Add cpufeature for Scaleable bus speed Jaswinder Singh Rajput
2009-05-11 16:50             ` [PATCH 7/15 -tip] x86: Add cpufeature for Miscellaneous Features Jaswinder Singh Rajput
2009-05-11 16:50               ` [PATCH 8/15 -tip] x86: Add cpufeature for Platform feature Jaswinder Singh Rajput
2009-05-11 16:51                 ` [PATCH 9/15 -tip] x86: Add cpufeature for Hardware configuration Jaswinder Singh Rajput
2009-05-11 16:52                   ` [PATCH 10/15 -tip] x86: Add cpufeature for System configuration Jaswinder Singh Rajput
2009-05-11 16:52                     ` [PATCH 11/15 -tip] x86: Add cpufeature for System management mode (SMM) Jaswinder Singh Rajput
2009-05-11 16:53                       ` [PATCH 12/15 -tip] x86: Add cpufeature for MM configuration Jaswinder Singh Rajput
2009-05-11 16:54                         ` [PATCH 13/15 -tip] x86: Add cpufeature for Bus configuration Jaswinder Singh Rajput
2009-05-11 16:55                           ` [PATCH 14/15 -tip] x86: Add cpufeature for performance frequency APERF/MPERF Jaswinder Singh Rajput
2009-05-11 16:55                             ` [PATCH 15/15 -tip] x86: Add cpufeature for ancient performance monitoring Jaswinder Singh Rajput
2009-05-11 18:13     ` [PATCH 2/15 -tip] x86: Add cpufeatures for Advanced Power Management H. Peter Anvin
2009-05-11 19:09       ` Ingo Molnar
2009-05-12  0:31         ` Jaswinder Singh Rajput
2009-05-11 18:15 ` [git-pull -tip] x86: Addition of cpufeatures to friendly access miscellaneous MSRs H. Peter Anvin
2009-05-11 18:47   ` Robert Richter
2009-05-11 19:26     ` H. Peter Anvin
2009-05-12  0:42   ` Jaswinder Singh Rajput
2009-05-12  0:49     ` H. Peter Anvin

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=1242060523.5139.15.camel@ht.satnam \
    --to=jaswinder@kernel.org \
    --cc=hpa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=robert.richter@amd.com \
    --cc=x86@kernel.org \
    /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