Lines Matching refs:hwc
140 struct hw_perf_event *hwc, int idx) in xtensa_perf_event_update() argument
146 prev_raw_count = local64_read(&hwc->prev_count); in xtensa_perf_event_update()
148 } while (local64_cmpxchg(&hwc->prev_count, prev_raw_count, in xtensa_perf_event_update()
154 local64_sub(delta, &hwc->period_left); in xtensa_perf_event_update()
158 struct hw_perf_event *hwc, int idx) in xtensa_perf_event_set_period() argument
166 s64 period = hwc->sample_period; in xtensa_perf_event_set_period()
168 left = local64_read(&hwc->period_left); in xtensa_perf_event_set_period()
171 local64_set(&hwc->period_left, left); in xtensa_perf_event_set_period()
172 hwc->last_period = period; in xtensa_perf_event_set_period()
176 local64_set(&hwc->period_left, left); in xtensa_perf_event_set_period()
177 hwc->last_period = period; in xtensa_perf_event_set_period()
184 local64_set(&hwc->prev_count, -left); in xtensa_perf_event_set_period()
245 struct hw_perf_event *hwc = &event->hw; in xtensa_pmu_start() local
246 int idx = hwc->idx; in xtensa_pmu_start()
253 xtensa_perf_event_set_period(event, hwc, idx); in xtensa_pmu_start()
256 hwc->state = 0; in xtensa_pmu_start()
258 set_er(hwc->config, XTENSA_PMU_PMCTRL(idx)); in xtensa_pmu_start()
263 struct hw_perf_event *hwc = &event->hw; in xtensa_pmu_stop() local
264 int idx = hwc->idx; in xtensa_pmu_stop()
266 if (!(hwc->state & PERF_HES_STOPPED)) { in xtensa_pmu_stop()
270 hwc->state |= PERF_HES_STOPPED; in xtensa_pmu_stop()
287 struct hw_perf_event *hwc = &event->hw; in xtensa_pmu_add() local
288 int idx = hwc->idx; in xtensa_pmu_add()
297 hwc->idx = idx; in xtensa_pmu_add()
301 hwc->state = PERF_HES_UPTODATE | PERF_HES_STOPPED; in xtensa_pmu_add()
373 struct hw_perf_event *hwc = &event->hw; in xtensa_pmu_irq_handler() local
380 xtensa_perf_event_update(event, hwc, i); in xtensa_pmu_irq_handler()
381 last_period = hwc->last_period; in xtensa_pmu_irq_handler()
382 if (xtensa_perf_event_set_period(event, hwc, i)) { in xtensa_pmu_irq_handler()