From: Venki Pallipadi <venkatesh.pallipadi@intel.com>
To: Andrew Morton <akpm@linux-foundation.org>,
Dave Jones <davej@redhat.com>, Len Brown <len.brown@intel.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH] Display Intel Dynamic Acceleration feature in /proc/cpuinfo
Date: Wed, 23 May 2007 15:46:37 -0700 [thread overview]
Message-ID: <20070523224637.GB15887@linux-os.sc.intel.com> (raw)
Display Intel Dynamic Acceleration feature in /proc/cpuinfo. This feature
will be enabled automatically by current acpi-cpufreq driver and cpufreq.
Refer to Intel Software Developer's Manual for more details about the feature.
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Index: linux-2.6.22-rc-mm/arch/i386/kernel/cpu/proc.c
===================================================================
--- linux-2.6.22-rc-mm.orig/arch/i386/kernel/cpu/proc.c
+++ linux-2.6.22-rc-mm/arch/i386/kernel/cpu/proc.c
@@ -41,7 +41,7 @@ static int show_cpuinfo(struct seq_file
"cxmmx", "k6_mtrr", "cyrix_arr", "centaur_mcr",
NULL, NULL, NULL, NULL,
"constant_tsc", "up", NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ "ida", NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
/* Intel-defined (#2) */
Index: linux-2.6.22-rc-mm/arch/x86_64/kernel/setup.c
===================================================================
--- linux-2.6.22-rc-mm.orig/arch/x86_64/kernel/setup.c
+++ linux-2.6.22-rc-mm/arch/x86_64/kernel/setup.c
@@ -949,7 +949,7 @@ static int show_cpuinfo(struct seq_file
/* Other (Linux-defined) */
"cxmmx", NULL, "cyrix_arr", "centaur_mcr", NULL,
"constant_tsc", NULL, NULL,
- "up", NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ "up", NULL, NULL, NULL, "ida", NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
Index: linux-2.6.22-rc-mm/include/asm-i386/cpufeature.h
===================================================================
--- linux-2.6.22-rc-mm.orig/include/asm-i386/cpufeature.h
+++ linux-2.6.22-rc-mm/include/asm-i386/cpufeature.h
@@ -81,6 +81,7 @@
#define X86_FEATURE_BTS (3*32+13) /* Branch Trace Store */
#define X86_FEATURE_LAPIC_TIMER_BROKEN (3*32+ 14) /* lapic timer broken in C1 */
#define X86_FEATURE_SYNC_RDTSC (3*32+15) /* RDTSC synchronizes the CPU */
+#define X86_FEATURE_IDA (3*32+16) /* Intel Dynamic Acceleration */
/* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */
#define X86_FEATURE_XMM3 (4*32+ 0) /* Streaming SIMD Extensions-3 */
Index: linux-2.6.22-rc-mm/include/asm-x86_64/cpufeature.h
===================================================================
--- linux-2.6.22-rc-mm.orig/include/asm-x86_64/cpufeature.h
+++ linux-2.6.22-rc-mm/include/asm-x86_64/cpufeature.h
@@ -70,6 +70,7 @@
#define X86_FEATURE_ARCH_PERFMON (3*32+9) /* Intel Architectural PerfMon */
#define X86_FEATURE_PEBS (3*32+10) /* Precise-Event Based Sampling */
#define X86_FEATURE_BTS (3*32+11) /* Branch Trace Store */
+#define X86_FEATURE_IDA (3*32+12) /* Intel Dynamic Acceleration */
/* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */
#define X86_FEATURE_XMM3 (4*32+ 0) /* Streaming SIMD Extensions-3 */
Index: linux-2.6.22-rc-mm/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
===================================================================
--- linux-2.6.22-rc-mm.orig/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
+++ linux-2.6.22-rc-mm/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
@@ -58,6 +58,7 @@ enum {
#define INTEL_MSR_RANGE (0xffff)
#define CPUID_6_ECX_APERFMPERF_CAPABILITY (0x1)
+#define CPUID_6_EAX_IDA_CAPABILITY (0x2)
struct acpi_cpufreq_data {
struct acpi_processor_performance *acpi_data;
@@ -699,10 +700,20 @@ static int acpi_cpufreq_cpu_init(struct
/* Check for APERF/MPERF support in hardware */
if (c->x86_vendor == X86_VENDOR_INTEL && c->cpuid_level >= 6) {
- unsigned int ecx;
+ unsigned int eax, ecx;
ecx = cpuid_ecx(6);
if (ecx & CPUID_6_ECX_APERFMPERF_CAPABILITY)
acpi_cpufreq_driver.getavg = get_measured_perf;
+
+ eax = cpuid_eax(6);
+ if (eax & CPUID_6_EAX_IDA_CAPABILITY) {
+ unsigned int i;
+
+ for_each_cpu_mask(i, policy->cpus) {
+ struct cpuinfo_x86 *c = &cpu_data[i];
+ set_bit(X86_FEATURE_IDA, c->x86_capability);
+ }
+ }
}
dprintk("CPU%u - ACPI performance management activated.\n", cpu);
next reply other threads:[~2007-05-23 22:49 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-23 22:46 Venki Pallipadi [this message]
2007-05-24 20:55 ` [PATCH] Display Intel Dynamic Acceleration feature in /proc/cpuinfo Andrew Morton
2007-05-24 21:01 ` Dave Jones
2007-05-24 21:08 ` Andi Kleen
2007-05-24 21:13 ` Venki Pallipadi
2007-05-24 21:25 ` Andi Kleen
2007-05-24 21:28 ` Venki Pallipadi
2007-05-24 21:37 ` Dave Jones
2007-05-24 21:56 ` Andi Kleen
2007-05-24 23:03 ` H. Peter Anvin
2007-05-24 23:13 ` Pallipadi, Venkatesh
2007-05-24 23:23 ` H. Peter Anvin
2007-05-25 0:00 ` Pallipadi, Venkatesh
2007-05-25 0:04 ` H. Peter Anvin
2007-05-30 0:52 ` Venki Pallipadi
2007-05-24 21:10 ` Venki Pallipadi
2007-05-24 22:02 ` Andrew Morton
2007-05-24 22:08 ` Venki Pallipadi
2007-05-24 22:16 ` H. Peter Anvin
2007-05-24 22:14 ` H. Peter Anvin
2007-05-24 22:41 ` Dave Jones
2007-05-24 22:51 ` H. Peter Anvin
2007-05-24 23:06 ` Dave Jones
2007-05-24 23:11 ` H. Peter Anvin
2007-05-24 23:50 ` Alan Cox
2007-05-24 23:53 ` H. Peter Anvin
2007-05-24 22:27 ` 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=20070523224637.GB15887@linux-os.sc.intel.com \
--to=venkatesh.pallipadi@intel.com \
--cc=akpm@linux-foundation.org \
--cc=davej@redhat.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.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