[tip:perf/core] perf, x86: Small fix to cpuid10_edx

From: tip-bot for Livio Soares
Date: Tue Jun 08 2010 - 16:56:29 EST


Commit-ID: e768aee89c687a50e6a2110e30c5cae1fbf0d2da
Gitweb: http://git.kernel.org/tip/e768aee89c687a50e6a2110e30c5cae1fbf0d2da
Author: Livio Soares <livio@xxxxxxxxxxxxxxxx>
AuthorDate: Thu, 3 Jun 2010 15:00:31 -0400
Committer: Ingo Molnar <mingo@xxxxxxx>
CommitDate: Tue, 8 Jun 2010 20:27:04 +0200

perf, x86: Small fix to cpuid10_edx

Fixes to 'cpuid10_edx' to comply with Intel documentation.
According to the Intel Manual, Volume 2A, Table 3-12, the cpuid for
architecture performance monitoring returns, in EDX, two pieces of
information:

1) Number of fixed-function counters (5 bits, not 4)
2) Width of fixed-function counters (8 bits)

Signed-off-by: Livio Soares <livio@xxxxxxxxxxxxxxxx>
Acked-by: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
Cc: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
Cc: Arjan van de Ven <arjan@xxxxxxxxxxxxxxx>
Cc: "H. Peter Anvin" <hpa@xxxxxxxxx>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
---
arch/x86/include/asm/perf_event.h | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/x86/include/asm/perf_event.h b/arch/x86/include/asm/perf_event.h
index 254883d..6ed3ae4 100644
--- a/arch/x86/include/asm/perf_event.h
+++ b/arch/x86/include/asm/perf_event.h
@@ -68,8 +68,9 @@ union cpuid10_eax {

union cpuid10_edx {
struct {
- unsigned int num_counters_fixed:4;
- unsigned int reserved:28;
+ unsigned int num_counters_fixed:5;
+ unsigned int bit_width_fixed:8;
+ unsigned int reserved:19;
} split;
unsigned int full;
};
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/