• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/arch/i386/oprofile/

Lines Matching refs:msrs

25 #define CTR_IS_RESERVED(msrs,c) (msrs->counters[(c)].addr ? 1 : 0)
26 #define CTR_READ(l,h,msrs,c) do {rdmsr(msrs->counters[(c)].addr, (l), (h));} while (0)
27 #define CTR_32BIT_WRITE(l,msrs,c) \
28 do {wrmsr(msrs->counters[(c)].addr, -(u32)(l), 0);} while (0)
31 #define CTRL_IS_RESERVED(msrs,c) (msrs->controls[(c)].addr ? 1 : 0)
32 #define CTRL_READ(l,h,msrs,c) do {rdmsr((msrs->controls[(c)].addr), (l), (h));} while (0)
33 #define CTRL_WRITE(l,h,msrs,c) do {wrmsr((msrs->controls[(c)].addr), (l), (h));} while (0)
45 static void ppro_fill_in_addresses(struct op_msrs * const msrs)
51 msrs->counters[i].addr = MSR_P6_PERFCTR0 + i;
53 msrs->counters[i].addr = 0;
58 msrs->controls[i].addr = MSR_P6_EVNTSEL0 + i;
60 msrs->controls[i].addr = 0;
65 static void ppro_setup_ctrs(struct op_msrs const * const msrs)
72 if (unlikely(!CTRL_IS_RESERVED(msrs,i)))
74 CTRL_READ(low, high, msrs, i);
76 CTRL_WRITE(low, high, msrs, i);
81 if (unlikely(!CTR_IS_RESERVED(msrs,i)))
83 CTR_32BIT_WRITE(1, msrs, i);
88 if ((counter_config[i].enabled) && (CTR_IS_RESERVED(msrs,i))) {
91 CTR_32BIT_WRITE(counter_config[i].count, msrs, i);
93 CTRL_READ(low, high, msrs, i);
100 CTRL_WRITE(low, high, msrs, i);
109 struct op_msrs const * const msrs)
117 CTR_READ(low, high, msrs, i);
120 CTR_32BIT_WRITE(reset_value[i], msrs, i);
139 static void ppro_start(struct op_msrs const * const msrs)
146 CTRL_READ(low, high, msrs, i);
148 CTRL_WRITE(low, high, msrs, i);
154 static void ppro_stop(struct op_msrs const * const msrs)
162 CTRL_READ(low, high, msrs, i);
164 CTRL_WRITE(low, high, msrs, i);
168 static void ppro_shutdown(struct op_msrs const * const msrs)
173 if (CTR_IS_RESERVED(msrs,i))
177 if (CTRL_IS_RESERVED(msrs,i))