Lines Matching refs:model
30 static struct op_x86_model_spec *model;
42 u64 op_x86_get_ctrl(struct op_x86_model_spec const *model,
52 event &= model->event_mask ? model->event_mask : 0xFF;
70 model->check_ctrs(args->regs, &__get_cpu_var(cpu_msrs));
74 model->stop(&__get_cpu_var(cpu_msrs));
89 for (i = 0; i < model->num_counters; ++i) {
94 for (i = 0; i < model->num_controls; ++i) {
106 model->start(msrs);
124 model->stop(msrs);
141 return !!model->switch_ctrl;
151 return virt % model->num_counters;
171 sizeof(struct op_msr) * model->num_virt_counters;
195 for (i = 0; i < model->num_virt_counters; ++i) {
212 for (i = 0; i < model->num_counters; ++i) {
225 for (i = 0; i < model->num_counters; ++i) {
242 si += model->num_counters;
243 if ((si >= model->num_virt_counters) || (counter_config[si].count == 0))
248 model->switch_ctrl(model, msrs);
262 return counter_config[model->num_counters].count ? 0 : -EINVAL;
293 sizeof(struct op_msr) * model->num_virt_counters);
323 size_t controls_size = sizeof(struct op_msr) * model->num_controls;
324 size_t counters_size = sizeof(struct op_msr) * model->num_counters;
354 model->setup_ctrs(model, msrs);
373 for (i = 0; i < model->num_controls; ++i) {
378 for (i = 0; i < model->num_counters; ++i) {
400 if (model->cpu_down)
401 model->cpu_down();
424 for (i = 0; i < model->num_virt_counters; ++i) {
482 err = model->fill_in_addresses(&per_cpu(cpu_msrs, 0));
492 sizeof(struct op_msr) * model->num_counters);
496 sizeof(struct op_msr) * model->num_controls);
533 model->shutdown(msrs);
603 model = &op_p4_spec;
609 model = &op_p4_spec;
614 model = &op_p4_ht2_spec;
646 * and model can be found in the Intel Software Developer's
694 model = spec;
737 model = &op_amd_spec;
764 model = &op_arch_perfmon_spec;
771 /* default values, can be overwritten by model */
779 if (model->init)
780 ret = model->init(ops);
784 if (!model->num_virt_counters)
785 model->num_virt_counters = model->num_counters;