Lines Matching refs:hwc
134 struct hw_perf_event *hwc = &event->hw; in hisi_uncore_pmu_event_init() local
173 hwc->idx = -1; in hisi_uncore_pmu_event_init()
174 hwc->config_base = event->attr.config; in hisi_uncore_pmu_event_init()
190 struct hw_perf_event *hwc = &event->hw; in hisi_uncore_pmu_enable_event() local
192 hisi_pmu->ops->write_evtype(hisi_pmu, hwc->idx, in hisi_uncore_pmu_enable_event()
195 hisi_pmu->ops->enable_counter_int(hisi_pmu, hwc); in hisi_uncore_pmu_enable_event()
196 hisi_pmu->ops->enable_counter(hisi_pmu, hwc); in hisi_uncore_pmu_enable_event()
205 struct hw_perf_event *hwc = &event->hw; in hisi_uncore_pmu_disable_event() local
207 hisi_pmu->ops->disable_counter(hisi_pmu, hwc); in hisi_uncore_pmu_disable_event()
208 hisi_pmu->ops->disable_counter_int(hisi_pmu, hwc); in hisi_uncore_pmu_disable_event()
214 struct hw_perf_event *hwc = &event->hw; in hisi_uncore_pmu_set_event_period() local
225 local64_set(&hwc->prev_count, val); in hisi_uncore_pmu_set_event_period()
227 hisi_pmu->ops->write_counter(hisi_pmu, hwc, val); in hisi_uncore_pmu_set_event_period()
234 struct hw_perf_event *hwc = &event->hw; in hisi_uncore_pmu_event_update() local
239 new_raw_count = hisi_pmu->ops->read_counter(hisi_pmu, hwc); in hisi_uncore_pmu_event_update()
240 prev_raw_count = local64_read(&hwc->prev_count); in hisi_uncore_pmu_event_update()
241 } while (local64_cmpxchg(&hwc->prev_count, prev_raw_count, in hisi_uncore_pmu_event_update()
255 struct hw_perf_event *hwc = &event->hw; in hisi_uncore_pmu_start() local
257 if (WARN_ON_ONCE(!(hwc->state & PERF_HES_STOPPED))) in hisi_uncore_pmu_start()
260 WARN_ON_ONCE(!(hwc->state & PERF_HES_UPTODATE)); in hisi_uncore_pmu_start()
261 hwc->state = 0; in hisi_uncore_pmu_start()
265 u64 prev_raw_count = local64_read(&hwc->prev_count); in hisi_uncore_pmu_start()
267 hisi_pmu->ops->write_counter(hisi_pmu, hwc, prev_raw_count); in hisi_uncore_pmu_start()
277 struct hw_perf_event *hwc = &event->hw; in hisi_uncore_pmu_stop() local
280 WARN_ON_ONCE(hwc->state & PERF_HES_STOPPED); in hisi_uncore_pmu_stop()
281 hwc->state |= PERF_HES_STOPPED; in hisi_uncore_pmu_stop()
283 if (hwc->state & PERF_HES_UPTODATE) in hisi_uncore_pmu_stop()
288 hwc->state |= PERF_HES_UPTODATE; in hisi_uncore_pmu_stop()
295 struct hw_perf_event *hwc = &event->hw; in hisi_uncore_pmu_add() local
298 hwc->state = PERF_HES_STOPPED | PERF_HES_UPTODATE; in hisi_uncore_pmu_add()
318 struct hw_perf_event *hwc = &event->hw; in hisi_uncore_pmu_del() local
321 hisi_uncore_pmu_clear_event_idx(hisi_pmu, hwc->idx); in hisi_uncore_pmu_del()
323 hisi_pmu->pmu_events.hw_events[hwc->idx] = NULL; in hisi_uncore_pmu_del()