Lines Matching refs:hwc
216 struct hw_perf_event *hwc = &event->hw; in riscv_pmu_read() local
219 int idx = hwc->idx; in riscv_pmu_read()
223 prev_raw_count = local64_read(&hwc->prev_count); in riscv_pmu_read()
226 oldval = local64_cmpxchg(&hwc->prev_count, prev_raw_count, in riscv_pmu_read()
253 struct hw_perf_event *hwc = &event->hw; in riscv_pmu_stop() local
255 WARN_ON_ONCE(hwc->state & PERF_HES_STOPPED); in riscv_pmu_stop()
256 hwc->state |= PERF_HES_STOPPED; in riscv_pmu_stop()
258 if ((flags & PERF_EF_UPDATE) && !(hwc->state & PERF_HES_UPTODATE)) { in riscv_pmu_stop()
260 hwc->state |= PERF_HES_UPTODATE; in riscv_pmu_stop()
269 struct hw_perf_event *hwc = &event->hw; in riscv_pmu_start() local
283 hwc->state = 0; in riscv_pmu_start()
291 local64_set(&hwc->prev_count, read_counter(hwc->idx)); in riscv_pmu_start()
300 struct hw_perf_event *hwc = &event->hw; in riscv_pmu_add() local
313 hwc->idx = hwc->config; in riscv_pmu_add()
314 cpuc->events[hwc->idx] = event; in riscv_pmu_add()
317 hwc->state = PERF_HES_UPTODATE | PERF_HES_STOPPED; in riscv_pmu_add()
331 struct hw_perf_event *hwc = &event->hw; in riscv_pmu_del() local
333 cpuc->events[hwc->idx] = NULL; in riscv_pmu_del()
387 struct hw_perf_event *hwc = &event->hw; in riscv_event_init() local
427 hwc->config = code; in riscv_event_init()
428 hwc->idx = -1; in riscv_event_init()