Lines Matching refs:hwc
104 struct hw_perf_event *hwc, int idx) in arc_perf_event_update() argument
106 uint64_t prev_raw_count = local64_read(&hwc->prev_count); in arc_perf_event_update()
114 local64_set(&hwc->prev_count, new_raw_count); in arc_perf_event_update()
116 local64_sub(delta, &hwc->period_left); in arc_perf_event_update()
154 struct hw_perf_event *hwc = &event->hw; in arc_pmu_event_init() local
158 hwc->sample_period = arc_pmu->max_period; in arc_pmu_event_init()
159 hwc->last_period = hwc->sample_period; in arc_pmu_event_init()
160 local64_set(&hwc->period_left, hwc->sample_period); in arc_pmu_event_init()
163 hwc->config = 0; in arc_pmu_event_init()
168 hwc->config |= ARC_REG_PCT_CONFIG_KERN; in arc_pmu_event_init()
172 hwc->config |= ARC_REG_PCT_CONFIG_USER; in arc_pmu_event_init()
181 hwc->config |= arc_pmu->ev_hw_idx[event->attr.config]; in arc_pmu_event_init()
183 (int) event->attr.config, (int) hwc->config, in arc_pmu_event_init()
191 hwc->config |= arc_pmu->ev_hw_idx[ret]; in arc_pmu_event_init()
216 struct hw_perf_event *hwc = &event->hw; in arc_pmu_event_set_period() local
217 s64 left = local64_read(&hwc->period_left); in arc_pmu_event_set_period()
218 s64 period = hwc->sample_period; in arc_pmu_event_set_period()
219 int idx = hwc->idx; in arc_pmu_event_set_period()
226 local64_set(&hwc->period_left, left); in arc_pmu_event_set_period()
227 hwc->last_period = period; in arc_pmu_event_set_period()
232 local64_set(&hwc->period_left, left); in arc_pmu_event_set_period()
233 hwc->last_period = period; in arc_pmu_event_set_period()
241 local64_set(&hwc->prev_count, value); in arc_pmu_event_set_period()
262 struct hw_perf_event *hwc = &event->hw; in arc_pmu_start() local
263 int idx = hwc->idx; in arc_pmu_start()
269 WARN_ON_ONCE(!(hwc->state & PERF_HES_UPTODATE)); in arc_pmu_start()
271 hwc->state = 0; in arc_pmu_start()
282 write_aux_reg(ARC_REG_PCT_CONFIG, hwc->config); /* condition */ in arc_pmu_start()
287 struct hw_perf_event *hwc = &event->hw; in arc_pmu_stop() local
288 int idx = hwc->idx; in arc_pmu_stop()
334 struct hw_perf_event *hwc = &event->hw; in arc_pmu_add() local
335 int idx = hwc->idx; in arc_pmu_add()
344 hwc->idx = idx; in arc_pmu_add()
361 local64_set(&hwc->prev_count, 0); in arc_pmu_add()
363 hwc->state = PERF_HES_UPTODATE | PERF_HES_STOPPED; in arc_pmu_add()
389 struct hw_perf_event *hwc; in arc_pmu_intr() local
405 hwc = &event->hw; in arc_pmu_intr()
407 WARN_ON_ONCE(hwc->idx != idx); in arc_pmu_intr()
410 perf_sample_data_init(&data, 0, hwc->last_period); in arc_pmu_intr()