From: Borislav Petkov <bp@amd64.org>
To: <akpm@linux-foundation.org>, davej@redhat.com
Cc: trenn@suse.de, linux@dominikbrodowski.net, <mingo@elte.hu>,
<hpa@zytor.com>, <tglx@linutronix.de>,
cpufreq@vger.kernel.org, <x86@kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: [-v2 PATCH 1/6] x86, cpu: Add AMD core boosting feature flag to /proc/cpuinfo
Date: Fri, 26 Mar 2010 14:39:55 +0100 [thread overview]
Message-ID: <1269610800-23847-2-git-send-email-bp@amd64.org> (raw)
In-Reply-To: <1269610800-23847-1-git-send-email-bp@amd64.org>
From: Borislav Petkov <borislav.petkov@amd.com>
By semi-popular demand, this adds the Core Performance Boost feature
flag to /proc/cpuinfo. Possible use case for this is userspace tools
like cpufreq-aperf, for example, so that they don't have to jump through
hoops of accessing "/dev/cpu/%d/cpuid" in order to check for CPB hw
support, or call cpuid from userspace.
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Reviewed-by: Thomas Renninger <trenn@suse.de>
---
arch/x86/include/asm/cpufeature.h | 1 +
arch/x86/kernel/cpu/addon_cpuid_features.c | 5 +++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h
index 0cd82d0..630e623 100644
--- a/arch/x86/include/asm/cpufeature.h
+++ b/arch/x86/include/asm/cpufeature.h
@@ -161,6 +161,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 */
/* Virtualization flags: Linux defined */
#define X86_FEATURE_TPR_SHADOW (8*32+ 0) /* Intel TPR Shadow */
diff --git a/arch/x86/kernel/cpu/addon_cpuid_features.c b/arch/x86/kernel/cpu/addon_cpuid_features.c
index 97ad79c..ead2a1c 100644
--- a/arch/x86/kernel/cpu/addon_cpuid_features.c
+++ b/arch/x86/kernel/cpu/addon_cpuid_features.c
@@ -30,8 +30,9 @@ 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_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 },
--
1.7.0
next prev parent reply other threads:[~2010-03-26 13:39 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-26 13:39 [-v2 PATCH 0/6] powernow-k8: Core Performance Boost and effective frequency support Borislav Petkov
2010-03-26 13:39 ` Borislav Petkov [this message]
2010-03-26 13:39 ` [-v2 PATCH 2/6] powernow-k8: Add core performance boost support Borislav Petkov
2010-03-30 22:42 ` Andrew Morton
2010-03-31 6:13 ` Borislav Petkov
2010-03-31 3:22 ` Andrew Morton
2010-03-31 6:35 ` Borislav Petkov
2010-03-31 3:38 ` Andrew Morton
2010-03-31 6:42 ` H. Peter Anvin
2010-03-31 15:08 ` Borislav Petkov
2010-03-31 15:16 ` Dave Jones
2010-04-09 20:57 ` H. Peter Anvin
2010-04-09 20:59 ` H. Peter Anvin
2010-04-08 9:48 ` Borislav Petkov
2010-03-26 13:39 ` [-v2 PATCH 3/6] x86: Unify APERF/MPERF support Borislav Petkov
2010-03-26 13:39 ` [-v2 PATCH 4/6] cpufreq: Add APERF/MPERF support for AMD processors Borislav Petkov
2010-03-26 13:39 ` [-v2 PATCH 5/6] powernow-k8: Fix frequency reporting Borislav Petkov
2010-03-26 13:40 ` [-v2 PATCH 6/6] cpufreq: Unify sysfs attribute definition macros 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=1269610800-23847-2-git-send-email-bp@amd64.org \
--to=bp@amd64.org \
--cc=akpm@linux-foundation.org \
--cc=cpufreq@vger.kernel.org \
--cc=davej@redhat.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@dominikbrodowski.net \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--cc=trenn@suse.de \
--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;
as well as URLs for NNTP newsgroup(s).