Lines Matching refs:msr
45 static inline unsigned int nmi_perfctr_msr_to_bit(unsigned int msr) in nmi_perfctr_msr_to_bit() argument
51 if (msr >= MSR_F15H_PERF_CTR) in nmi_perfctr_msr_to_bit()
52 return (msr - MSR_F15H_PERF_CTR) >> 1; in nmi_perfctr_msr_to_bit()
53 return msr - MSR_K7_PERFCTR0; in nmi_perfctr_msr_to_bit()
56 return msr - MSR_ARCH_PERFMON_PERFCTR0; in nmi_perfctr_msr_to_bit()
60 return msr - MSR_P6_PERFCTR0; in nmi_perfctr_msr_to_bit()
62 return msr - MSR_KNC_PERFCTR0; in nmi_perfctr_msr_to_bit()
64 return msr - MSR_P4_BPU_PERFCTR0; in nmi_perfctr_msr_to_bit()
69 return msr - MSR_ARCH_PERFMON_PERFCTR0; in nmi_perfctr_msr_to_bit()
78 static inline unsigned int nmi_evntsel_msr_to_bit(unsigned int msr) in nmi_evntsel_msr_to_bit() argument
84 if (msr >= MSR_F15H_PERF_CTL) in nmi_evntsel_msr_to_bit()
85 return (msr - MSR_F15H_PERF_CTL) >> 1; in nmi_evntsel_msr_to_bit()
86 return msr - MSR_K7_EVNTSEL0; in nmi_evntsel_msr_to_bit()
89 return msr - MSR_ARCH_PERFMON_EVENTSEL0; in nmi_evntsel_msr_to_bit()
93 return msr - MSR_P6_EVNTSEL0; in nmi_evntsel_msr_to_bit()
95 return msr - MSR_KNC_EVNTSEL0; in nmi_evntsel_msr_to_bit()
97 return msr - MSR_P4_BSU_ESCR0; in nmi_evntsel_msr_to_bit()
102 return msr - MSR_ARCH_PERFMON_EVENTSEL0; in nmi_evntsel_msr_to_bit()
108 int reserve_perfctr_nmi(unsigned int msr) in reserve_perfctr_nmi() argument
112 counter = nmi_perfctr_msr_to_bit(msr); in reserve_perfctr_nmi()
123 void release_perfctr_nmi(unsigned int msr) in release_perfctr_nmi() argument
127 counter = nmi_perfctr_msr_to_bit(msr); in release_perfctr_nmi()
136 int reserve_evntsel_nmi(unsigned int msr) in reserve_evntsel_nmi() argument
140 counter = nmi_evntsel_msr_to_bit(msr); in reserve_evntsel_nmi()
151 void release_evntsel_nmi(unsigned int msr) in release_evntsel_nmi() argument
155 counter = nmi_evntsel_msr_to_bit(msr); in release_evntsel_nmi()