Lines Matching refs:hwc

186 	struct hw_perf_event *hwc = &event->hw;  in hisi_uncore_pmu_event_init()  local
225 hwc->idx = -1; in hisi_uncore_pmu_event_init()
226 hwc->config_base = event->attr.config; in hisi_uncore_pmu_event_init()
245 struct hw_perf_event *hwc = &event->hw; in hisi_uncore_pmu_enable_event() local
247 hisi_pmu->ops->write_evtype(hisi_pmu, hwc->idx, in hisi_uncore_pmu_enable_event()
253 hisi_pmu->ops->enable_counter_int(hisi_pmu, hwc); in hisi_uncore_pmu_enable_event()
254 hisi_pmu->ops->enable_counter(hisi_pmu, hwc); in hisi_uncore_pmu_enable_event()
263 struct hw_perf_event *hwc = &event->hw; in hisi_uncore_pmu_disable_event() local
265 hisi_pmu->ops->disable_counter(hisi_pmu, hwc); in hisi_uncore_pmu_disable_event()
266 hisi_pmu->ops->disable_counter_int(hisi_pmu, hwc); in hisi_uncore_pmu_disable_event()
275 struct hw_perf_event *hwc = &event->hw; in hisi_uncore_pmu_set_event_period() local
286 local64_set(&hwc->prev_count, val); in hisi_uncore_pmu_set_event_period()
288 hisi_pmu->ops->write_counter(hisi_pmu, hwc, val); in hisi_uncore_pmu_set_event_period()
295 struct hw_perf_event *hwc = &event->hw; in hisi_uncore_pmu_event_update() local
300 new_raw_count = hisi_pmu->ops->read_counter(hisi_pmu, hwc); in hisi_uncore_pmu_event_update()
301 prev_raw_count = local64_read(&hwc->prev_count); in hisi_uncore_pmu_event_update()
302 } while (local64_cmpxchg(&hwc->prev_count, prev_raw_count, in hisi_uncore_pmu_event_update()
316 struct hw_perf_event *hwc = &event->hw; in hisi_uncore_pmu_start() local
318 if (WARN_ON_ONCE(!(hwc->state & PERF_HES_STOPPED))) in hisi_uncore_pmu_start()
321 WARN_ON_ONCE(!(hwc->state & PERF_HES_UPTODATE)); in hisi_uncore_pmu_start()
322 hwc->state = 0; in hisi_uncore_pmu_start()
326 u64 prev_raw_count = local64_read(&hwc->prev_count); in hisi_uncore_pmu_start()
328 hisi_pmu->ops->write_counter(hisi_pmu, hwc, prev_raw_count); in hisi_uncore_pmu_start()
338 struct hw_perf_event *hwc = &event->hw; in hisi_uncore_pmu_stop() local
341 WARN_ON_ONCE(hwc->state & PERF_HES_STOPPED); in hisi_uncore_pmu_stop()
342 hwc->state |= PERF_HES_STOPPED; in hisi_uncore_pmu_stop()
344 if (hwc->state & PERF_HES_UPTODATE) in hisi_uncore_pmu_stop()
349 hwc->state |= PERF_HES_UPTODATE; in hisi_uncore_pmu_stop()
356 struct hw_perf_event *hwc = &event->hw; in hisi_uncore_pmu_add() local
359 hwc->state = PERF_HES_STOPPED | PERF_HES_UPTODATE; in hisi_uncore_pmu_add()
379 struct hw_perf_event *hwc = &event->hw; in hisi_uncore_pmu_del() local
382 hisi_uncore_pmu_clear_event_idx(hisi_pmu, hwc->idx); in hisi_uncore_pmu_del()
384 hisi_pmu->pmu_events.hw_events[hwc->idx] = NULL; in hisi_uncore_pmu_del()