aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/perf_counter.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-12-17 04:51:15 -0500
committerIngo Molnar <mingo@elte.hu>2008-12-23 06:45:11 -0500
commit703e937c83bbad79075a7846e062e447c2fee6a4 (patch)
tree7c3e23179f14c32368213024be20dcf27bb6e7a8 /arch/x86/include/asm/perf_counter.h
parenteb2b861810d4ff72454c83996b891df4e0aaff9a (diff)
perfcounters: add fixed-mode PMC enumeration
Enumerate fixed-mode PMCs based on CPUID, and feed that into the perfcounter code. Does not use fixed-mode PMCs yet. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/include/asm/perf_counter.h')
-rw-r--r--arch/x86/include/asm/perf_counter.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/x86/include/asm/perf_counter.h b/arch/x86/include/asm/perf_counter.h
index dd5a4a559e2d..945a315e6d62 100644
--- a/arch/x86/include/asm/perf_counter.h
+++ b/arch/x86/include/asm/perf_counter.h
@@ -41,6 +41,29 @@ union cpuid10_eax {
41 unsigned int full; 41 unsigned int full;
42}; 42};
43 43
44union cpuid10_edx {
45 struct {
46 unsigned int num_counters_fixed:4;
47 unsigned int reserved:28;
48 } split;
49 unsigned int full;
50};
51
52
53/*
54 * Fixed-purpose performance counters:
55 */
56
57/* Instr_Retired.Any: */
58#define MSR_ARCH_PERFMON_FIXED_CTR0 0x309
59
60/* CPU_CLK_Unhalted.Core: */
61#define MSR_ARCH_PERFMON_FIXED_CTR1 0x30a
62
63/* CPU_CLK_Unhalted.Ref: */
64#define MSR_ARCH_PERFMON_FIXED_CTR2 0x30b
65
66
44#ifdef CONFIG_PERF_COUNTERS 67#ifdef CONFIG_PERF_COUNTERS
45extern void init_hw_perf_counters(void); 68extern void init_hw_perf_counters(void);
46extern void perf_counters_lapic_init(int nmi); 69extern void perf_counters_lapic_init(int nmi);