All of lore.kernel.org
 help / color / mirror / Atom feed
From: "tip-bot for H. Peter Anvin" <hpa@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
	trenn@suse.de, tglx@linutronix.de, borislav.petkov@amd.com
Subject: [tip:x86/cpu] x86, cpu: Make APERF/MPERF a normal table-driven flag
Date: Mon, 3 May 2010 23:21:41 GMT	[thread overview]
Message-ID: <tip-097c1bd5673edaf2a162724636858b71f658fdd2@git.kernel.org> (raw)
In-Reply-To: <1270065406-1814-4-git-send-email-bp@amd64.org>

Commit-ID:  097c1bd5673edaf2a162724636858b71f658fdd2
Gitweb:     http://git.kernel.org/tip/097c1bd5673edaf2a162724636858b71f658fdd2
Author:     H. Peter Anvin <hpa@zytor.com>
AuthorDate: Mon, 3 May 2010 15:49:31 -0700
Committer:  H. Peter Anvin <hpa@zytor.com>
CommitDate: Mon, 3 May 2010 15:49:31 -0700

x86, cpu: Make APERF/MPERF a normal table-driven flag

APERF/MPERF can be handled via the table like all the other scattered
CPU flags.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Thomas Renninger <trenn@suse.de>
Cc: Borislav Petkov <borislav.petkov@amd.com>
LKML-Reference: <1270065406-1814-4-git-send-email-bp@amd64.org>
---
 arch/x86/kernel/cpu/addon_cpuid_features.c |   23 ++++++++---------------
 1 files changed, 8 insertions(+), 15 deletions(-)

diff --git a/arch/x86/kernel/cpu/addon_cpuid_features.c b/arch/x86/kernel/cpu/addon_cpuid_features.c
index fd1fc19..10fa568 100644
--- a/arch/x86/kernel/cpu/addon_cpuid_features.c
+++ b/arch/x86/kernel/cpu/addon_cpuid_features.c
@@ -30,13 +30,14 @@ void __cpuinit init_scattered_cpuid_features(struct cpuinfo_x86 *c)
 	const struct cpuid_bit *cb;
 
 	static const struct cpuid_bit __cpuinitconst cpuid_bits[] = {
-		{ X86_FEATURE_IDA,   CR_EAX, 1, 0x00000006 },
-		{ X86_FEATURE_ARAT,  CR_EAX, 2, 0x00000006 },
-		{ X86_FEATURE_CPB,   CR_EDX, 9, 0x80000007 },
-		{ X86_FEATURE_NPT,   CR_EDX, 0, 0x8000000a },
-		{ X86_FEATURE_LBRV,  CR_EDX, 1, 0x8000000a },
-		{ X86_FEATURE_SVML,  CR_EDX, 2, 0x8000000a },
-		{ X86_FEATURE_NRIPS, CR_EDX, 3, 0x8000000a },
+		{ X86_FEATURE_IDA,   		CR_EAX, 1, 0x00000006 },
+		{ X86_FEATURE_ARAT,  		CR_EAX, 2, 0x00000006 },
+		{ X86_FEATURE_APERFMPERF,	CR_ECX, 0, 0x00000006 },
+		{ X86_FEATURE_CPB,   		CR_EDX, 9, 0x80000007 },
+		{ X86_FEATURE_NPT,   		CR_EDX, 0, 0x8000000a },
+		{ X86_FEATURE_LBRV,  		CR_EDX, 1, 0x8000000a },
+		{ X86_FEATURE_SVML,  		CR_EDX, 2, 0x8000000a },
+		{ X86_FEATURE_NRIPS, 		CR_EDX, 3, 0x8000000a },
 		{ 0, 0, 0, 0 }
 	};
 
@@ -54,14 +55,6 @@ void __cpuinit init_scattered_cpuid_features(struct cpuinfo_x86 *c)
 		if (regs[cb->reg] & (1 << cb->bit))
 			set_cpu_cap(c, cb->feature);
 	}
-
-	/*
-	 * common AMD/Intel features
-	 */
-	if (c->cpuid_level >= 6) {
-		if (cpuid_ecx(6) & 0x1)
-			set_cpu_cap(c, X86_FEATURE_APERFMPERF);
-	}
 }
 
 /* leaf 0xb SMT level */

  parent reply	other threads:[~2010-05-03 23:22 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-31 19:56 [-v3 PATCH 0/6] powernow-k8: Core Performance Boost and effective frequency support Borislav Petkov
2010-03-31 19:56 ` [PATCH 1/6] x86, cpu: Add AMD core boosting feature flag to /proc/cpuinfo Borislav Petkov
2010-04-09 22:18   ` [tip:x86/cpu] " tip-bot for Borislav Petkov
2010-03-31 19:56 ` [PATCH 2/6] powernow-k8: Add core performance boost support Borislav Petkov
2010-04-09 22:19   ` [tip:x86/cpu] " tip-bot for Borislav Petkov
2010-03-31 19:56 ` [PATCH 3/6] x86: Unify APERF/MPERF support Borislav Petkov
2010-04-09 22:19   ` [tip:x86/cpu] " tip-bot for Borislav Petkov
2010-05-03 23:21   ` tip-bot for H. Peter Anvin [this message]
2010-03-31 19:56 ` [PATCH 4/6] cpufreq: Add APERF/MPERF support for AMD processors Borislav Petkov
2010-04-01  9:01   ` Marvin
2010-04-01 10:36     ` Borislav Petkov
2010-04-01 11:46       ` Marvin
2010-04-01 14:00         ` Borislav Petkov
2010-04-01 14:19   ` [-v3.1 PATCH " Borislav Petkov
2010-04-09 22:19     ` [tip:x86/cpu] x86, " tip-bot for Mark Langsdorf
2010-03-31 19:56 ` [PATCH 5/6] powernow-k8: Fix frequency reporting Borislav Petkov
2010-04-09 22:19   ` [tip:x86/cpu] " tip-bot for Mark Langsdorf
2010-05-03 13:09   ` [tip:x86/urgent] " tip-bot for Mark Langsdorf
2010-03-31 19:56 ` [PATCH 6/6] cpufreq: Unify sysfs attribute definition macros Borislav Petkov
2010-04-09 22:20   ` [tip:x86/cpu] " tip-bot for Borislav Petkov

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-097c1bd5673edaf2a162724636858b71f658fdd2@git.kernel.org \
    --to=hpa@zytor.com \
    --cc=borislav.petkov@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=trenn@suse.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.