Skip to contentSkip to conversation

perf, x86: Small fix to cpuid10_edx

tip:perf/core tip-bot for Livio Soares 1 participant 1 message Jun 8, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw
Commit-ID:  e768aee89c687a50e6a2110e30c5cae1fbf0d2da
Gitweb:     http://git.kernel.org/tip/e768aee89c687a50e6a2110e30c5cae1fbf0d2da
Author:     Livio Soares <[email protected]>
AuthorDate: Thu, 3 Jun 2010 15:00:31 -0400
Committer:  Ingo Molnar <[email protected]>
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)

Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Arjan van de Ven <[email protected]>
Cc "H. Peter Anvin" <[email protected]>

LKML-Reference: <new-submission>

---
 arch/x86/include/asm/perf_event.h |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
arch/x86/include/asm/perf_event.h +3 -2
index 254883d..6ed3ae4 100644
@@ -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;
 };