Home
last modified time | relevance | path

Searched refs:msrs (Results 1 – 11 of 11) sorted by relevance

/arch/x86/oprofile/
Dop_model_ppro.c33 static void ppro_shutdown(struct op_msrs const * const msrs) in ppro_shutdown() argument
38 if (!msrs->counters[i].addr) in ppro_shutdown()
45 static int ppro_fill_in_addresses(struct op_msrs * const msrs) in ppro_fill_in_addresses() argument
57 msrs->counters[i].addr = MSR_P6_PERFCTR0 + i; in ppro_fill_in_addresses()
58 msrs->controls[i].addr = MSR_P6_EVNTSEL0 + i; in ppro_fill_in_addresses()
64 ppro_shutdown(msrs); in ppro_fill_in_addresses()
73 struct op_msrs const * const msrs) in ppro_setup_ctrs() argument
97 if (!msrs->controls[i].addr) in ppro_setup_ctrs()
99 rdmsrl(msrs->controls[i].addr, val); in ppro_setup_ctrs()
103 wrmsrl(msrs->controls[i].addr, val); in ppro_setup_ctrs()
[all …]
Dop_model_amd.c134 struct op_msrs const * const msrs) in op_amd_handle_ibs() argument
270 struct op_msrs const * const msrs) in op_mux_switch_ctrl() argument
280 rdmsrl(msrs->controls[i].addr, val); in op_mux_switch_ctrl()
283 wrmsrl(msrs->controls[i].addr, val); in op_mux_switch_ctrl()
291 static void op_amd_shutdown(struct op_msrs const * const msrs) in op_amd_shutdown() argument
296 if (!msrs->counters[i].addr) in op_amd_shutdown()
303 static int op_amd_fill_in_addresses(struct op_msrs * const msrs) in op_amd_fill_in_addresses() argument
316 msrs->counters[i].addr = MSR_F15H_PERF_CTR + (i << 1); in op_amd_fill_in_addresses()
317 msrs->controls[i].addr = MSR_F15H_PERF_CTL + (i << 1); in op_amd_fill_in_addresses()
319 msrs->controls[i].addr = MSR_K7_EVNTSEL0 + i; in op_amd_fill_in_addresses()
[all …]
Dop_x86_model.h43 int (*fill_in_addresses)(struct op_msrs * const msrs);
45 struct op_msrs const * const msrs);
47 struct op_msrs const * const msrs);
48 void (*start)(struct op_msrs const * const msrs);
49 void (*stop)(struct op_msrs const * const msrs);
50 void (*shutdown)(struct op_msrs const * const msrs);
53 struct op_msrs const * const msrs);
Dnmi_int.c75 static void nmi_cpu_save_registers(struct op_msrs *msrs) in nmi_cpu_save_registers() argument
77 struct op_msr *counters = msrs->counters; in nmi_cpu_save_registers()
78 struct op_msr *controls = msrs->controls; in nmi_cpu_save_registers()
94 struct op_msrs const *msrs = &__get_cpu_var(cpu_msrs); in nmi_cpu_start() local
95 if (!msrs->controls) in nmi_cpu_start()
98 model->start(msrs); in nmi_cpu_start()
114 struct op_msrs const *msrs = &__get_cpu_var(cpu_msrs); in nmi_cpu_stop() local
115 if (!msrs->controls) in nmi_cpu_stop()
118 model->stop(msrs); in nmi_cpu_stop()
181 static void nmi_cpu_setup_mux(int cpu, struct op_msrs const * const msrs) in nmi_cpu_setup_mux() argument
[all …]
Dop_model_p4.c388 static void p4_shutdown(struct op_msrs const * const msrs) in p4_shutdown() argument
393 if (msrs->counters[i].addr) in p4_shutdown()
394 release_perfctr_nmi(msrs->counters[i].addr); in p4_shutdown()
402 if (msrs->controls[i].addr) in p4_shutdown()
403 release_evntsel_nmi(msrs->controls[i].addr); in p4_shutdown()
407 static int p4_fill_in_addresses(struct op_msrs * const msrs) in p4_fill_in_addresses() argument
420 msrs->counters[i].addr = addr; in p4_fill_in_addresses()
421 msrs->controls[i].addr = cccraddr; in p4_fill_in_addresses()
429 msrs->controls[i].addr = addr; in p4_fill_in_addresses()
438 msrs->controls[i].addr = addr; in p4_fill_in_addresses()
[all …]
/arch/x86/lib/
Dmsr.c7 struct msr *msrs = NULL; in msrs_alloc() local
9 msrs = alloc_percpu(struct msr); in msrs_alloc()
10 if (!msrs) { in msrs_alloc()
15 return msrs; in msrs_alloc()
19 void msrs_free(struct msr *msrs) in msrs_free() argument
21 free_percpu(msrs); in msrs_free()
Dmsr-smp.c12 if (rv->msrs) in __rdmsr_on_cpu()
13 reg = per_cpu_ptr(rv->msrs, this_cpu); in __rdmsr_on_cpu()
26 if (rv->msrs) in __wrmsr_on_cpu()
27 reg = per_cpu_ptr(rv->msrs, this_cpu); in __wrmsr_on_cpu()
67 struct msr *msrs, in __rwmsr_on_cpus() argument
75 rv.msrs = msrs; in __rwmsr_on_cpus()
94 void rdmsr_on_cpus(const struct cpumask *mask, u32 msr_no, struct msr *msrs) in rdmsr_on_cpus() argument
96 __rwmsr_on_cpus(mask, msr_no, msrs, __rdmsr_on_cpu); in rdmsr_on_cpus()
108 void wrmsr_on_cpus(const struct cpumask *mask, u32 msr_no, struct msr *msrs) in wrmsr_on_cpus() argument
110 __rwmsr_on_cpus(mask, msr_no, msrs, __wrmsr_on_cpu); in wrmsr_on_cpus()
/arch/x86/include/asm/
Dmsr.h25 struct msr *msrs; member
216 void msrs_free(struct msr *msrs);
221 void rdmsr_on_cpus(const struct cpumask *mask, u32 msr_no, struct msr *msrs);
222 void wrmsr_on_cpus(const struct cpumask *mask, u32 msr_no, struct msr *msrs);
239 struct msr *msrs) in rdmsr_on_cpus() argument
241 rdmsr_on_cpu(0, msr_no, &(msrs[0].l), &(msrs[0].h)); in rdmsr_on_cpus()
244 struct msr *msrs) in wrmsr_on_cpus() argument
246 wrmsr_on_cpu(0, msr_no, msrs[0].l, msrs[0].h); in wrmsr_on_cpus()
/arch/x86/kernel/cpu/mcheck/
Dmce.c1525 u32 msrs[] = { in __mcheck_cpu_apply_quirks() local
1538 for (i = 0; i < ARRAY_SIZE(msrs); i++) { in __mcheck_cpu_apply_quirks()
1539 rdmsrl(msrs[i], val); in __mcheck_cpu_apply_quirks()
1544 wrmsrl(msrs[i], val); in __mcheck_cpu_apply_quirks()
/arch/x86/kvm/
Dx86.c110 u32 msrs[KVM_NR_SHARED_MSRS]; member
182 wrmsrl(shared_msrs_global.msrs[slot], values->host); in kvm_on_user_return()
211 shared_msrs_global.msrs[slot] = msr; in kvm_define_shared_msr()
222 shared_msr_update(i, shared_msrs_global.msrs[i]); in kvm_shared_msr_cpu_online()
233 wrmsrl(shared_msrs_global.msrs[slot], value); in kvm_set_shared_msr()
2441 static int __msr_io(struct kvm_vcpu *vcpu, struct kvm_msrs *msrs, in __msr_io() argument
2449 for (i = 0; i < msrs->nmsrs; ++i) in __msr_io()
2467 struct kvm_msrs msrs; in msr_io() local
2473 if (copy_from_user(&msrs, user_msrs, sizeof msrs)) in msr_io()
2477 if (msrs.nmsrs >= MAX_IO_MSRS) in msr_io()
[all …]
Dvmx.c6931 struct perf_guest_switch_msr *msrs; in atomic_switch_perf_msrs() local
6933 msrs = perf_guest_get_msrs(&nr_msrs); in atomic_switch_perf_msrs()
6935 if (!msrs) in atomic_switch_perf_msrs()
6939 if (msrs[i].host == msrs[i].guest) in atomic_switch_perf_msrs()
6940 clear_atomic_switch_msr(vmx, msrs[i].msr); in atomic_switch_perf_msrs()
6942 add_atomic_switch_msr(vmx, msrs[i].msr, msrs[i].guest, in atomic_switch_perf_msrs()
6943 msrs[i].host); in atomic_switch_perf_msrs()