Lines Matching refs:cpuhw
125 struct cpu_hw_events *cpuhw; in validate_ctr_version() local
128 cpuhw = &get_cpu_var(cpu_hw_events); in validate_ctr_version()
134 if (cpuhw->info.cfvn < 1) in validate_ctr_version()
139 if (cpuhw->info.csvn < 1) in validate_ctr_version()
150 struct cpu_hw_events *cpuhw; in validate_ctr_auth() local
154 cpuhw = &get_cpu_var(cpu_hw_events); in validate_ctr_auth()
158 if (!(ctrs_state & cpuhw->info.auth_ctl)) in validate_ctr_auth()
172 struct cpu_hw_events *cpuhw = &__get_cpu_var(cpu_hw_events); in cpumf_pmu_enable() local
175 if (cpuhw->flags & PMU_F_ENABLED) in cpumf_pmu_enable()
178 err = lcctl(cpuhw->state); in cpumf_pmu_enable()
185 cpuhw->flags |= PMU_F_ENABLED; in cpumf_pmu_enable()
195 struct cpu_hw_events *cpuhw = &__get_cpu_var(cpu_hw_events); in cpumf_pmu_disable() local
199 if (!(cpuhw->flags & PMU_F_ENABLED)) in cpumf_pmu_disable()
202 inactive = cpuhw->state & ~((1 << CPUMF_LCCTL_ENABLE_SHIFT) - 1); in cpumf_pmu_disable()
210 cpuhw->flags &= ~PMU_F_ENABLED; in cpumf_pmu_disable()
223 struct cpu_hw_events *cpuhw; in cpumf_measurement_alert() local
229 cpuhw = &__get_cpu_var(cpu_hw_events); in cpumf_measurement_alert()
233 if (!(cpuhw->flags & PMU_F_RESERVED)) in cpumf_measurement_alert()
238 qctri(&cpuhw->info); in cpumf_measurement_alert()
249 struct cpu_hw_events *cpuhw = &__get_cpu_var(cpu_hw_events); in setup_pmc_cpu() local
253 memset(&cpuhw->info, 0, sizeof(cpuhw->info)); in setup_pmc_cpu()
254 qctri(&cpuhw->info); in setup_pmc_cpu()
255 cpuhw->flags |= PMU_F_RESERVED; in setup_pmc_cpu()
259 cpuhw->flags &= ~PMU_F_RESERVED; in setup_pmc_cpu()
481 struct cpu_hw_events *cpuhw = &__get_cpu_var(cpu_hw_events); in cpumf_pmu_start() local
496 ctr_set_enable(&cpuhw->state, hwc->config_base); in cpumf_pmu_start()
497 ctr_set_start(&cpuhw->state, hwc->config_base); in cpumf_pmu_start()
507 atomic_inc(&cpuhw->ctr_set[hwc->config_base]); in cpumf_pmu_start()
512 struct cpu_hw_events *cpuhw = &__get_cpu_var(cpu_hw_events); in cpumf_pmu_stop() local
520 if (!atomic_dec_return(&cpuhw->ctr_set[hwc->config_base])) in cpumf_pmu_stop()
521 ctr_set_stop(&cpuhw->state, hwc->config_base); in cpumf_pmu_stop()
533 struct cpu_hw_events *cpuhw = &__get_cpu_var(cpu_hw_events); in cpumf_pmu_add() local
540 if (!(cpuhw->flags & PERF_EVENT_TXN)) in cpumf_pmu_add()
544 ctr_set_enable(&cpuhw->state, event->hw.config_base); in cpumf_pmu_add()
557 struct cpu_hw_events *cpuhw = &__get_cpu_var(cpu_hw_events); in cpumf_pmu_del() local
569 if (!atomic_read(&cpuhw->ctr_set[event->hw.config_base])) in cpumf_pmu_del()
570 ctr_set_disable(&cpuhw->state, event->hw.config_base); in cpumf_pmu_del()
581 struct cpu_hw_events *cpuhw = &__get_cpu_var(cpu_hw_events); in cpumf_pmu_start_txn() local
584 cpuhw->flags |= PERF_EVENT_TXN; in cpumf_pmu_start_txn()
585 cpuhw->tx_state = cpuhw->state; in cpumf_pmu_start_txn()
595 struct cpu_hw_events *cpuhw = &__get_cpu_var(cpu_hw_events); in cpumf_pmu_cancel_txn() local
597 WARN_ON(cpuhw->tx_state != cpuhw->state); in cpumf_pmu_cancel_txn()
599 cpuhw->flags &= ~PERF_EVENT_TXN; in cpumf_pmu_cancel_txn()
610 struct cpu_hw_events *cpuhw = &__get_cpu_var(cpu_hw_events); in cpumf_pmu_commit_txn() local
614 state = cpuhw->state & ~((1 << CPUMF_LCCTL_ENABLE_SHIFT) - 1); in cpumf_pmu_commit_txn()
616 if ((state & cpuhw->info.auth_ctl) != state) in cpumf_pmu_commit_txn()
619 cpuhw->flags &= ~PERF_EVENT_TXN; in cpumf_pmu_commit_txn()