Lines Matching refs:hwc

119 				  struct hw_perf_event *hwc, int idx)  in arc_perf_event_update()  argument
121 u64 prev_raw_count = local64_read(&hwc->prev_count); in arc_perf_event_update()
129 local64_set(&hwc->prev_count, new_raw_count); in arc_perf_event_update()
131 local64_sub(delta, &hwc->period_left); in arc_perf_event_update()
169 struct hw_perf_event *hwc = &event->hw; in arc_pmu_event_init() local
173 hwc->sample_period = arc_pmu->max_period; in arc_pmu_event_init()
174 hwc->last_period = hwc->sample_period; in arc_pmu_event_init()
175 local64_set(&hwc->period_left, hwc->sample_period); in arc_pmu_event_init()
178 hwc->config = 0; in arc_pmu_event_init()
183 hwc->config |= ARC_REG_PCT_CONFIG_KERN; in arc_pmu_event_init()
187 hwc->config |= ARC_REG_PCT_CONFIG_USER; in arc_pmu_event_init()
196 hwc->config |= arc_pmu->ev_hw_idx[event->attr.config]; in arc_pmu_event_init()
198 (int)event->attr.config, (int)hwc->config, in arc_pmu_event_init()
206 hwc->config |= arc_pmu->ev_hw_idx[ret]; in arc_pmu_event_init()
208 (int)hwc->config, arc_pmu_ev_hw_map[ret]); in arc_pmu_event_init()
215 hwc->config |= event->attr.config; in arc_pmu_event_init()
245 struct hw_perf_event *hwc = &event->hw; in arc_pmu_event_set_period() local
246 s64 left = local64_read(&hwc->period_left); in arc_pmu_event_set_period()
247 s64 period = hwc->sample_period; in arc_pmu_event_set_period()
248 int idx = hwc->idx; in arc_pmu_event_set_period()
255 local64_set(&hwc->period_left, left); in arc_pmu_event_set_period()
256 hwc->last_period = period; in arc_pmu_event_set_period()
261 local64_set(&hwc->period_left, left); in arc_pmu_event_set_period()
262 hwc->last_period = period; in arc_pmu_event_set_period()
270 local64_set(&hwc->prev_count, value); in arc_pmu_event_set_period()
291 struct hw_perf_event *hwc = &event->hw; in arc_pmu_start() local
292 int idx = hwc->idx; in arc_pmu_start()
298 WARN_ON_ONCE(!(hwc->state & PERF_HES_UPTODATE)); in arc_pmu_start()
300 hwc->state = 0; in arc_pmu_start()
311 write_aux_reg(ARC_REG_PCT_CONFIG, hwc->config); /* condition */ in arc_pmu_start()
316 struct hw_perf_event *hwc = &event->hw; in arc_pmu_stop() local
317 int idx = hwc->idx; in arc_pmu_stop()
363 struct hw_perf_event *hwc = &event->hw; in arc_pmu_add() local
364 int idx = hwc->idx; in arc_pmu_add()
371 hwc->idx = idx; in arc_pmu_add()
388 local64_set(&hwc->prev_count, 0); in arc_pmu_add()
390 hwc->state = PERF_HES_UPTODATE | PERF_HES_STOPPED; in arc_pmu_add()
418 struct hw_perf_event *hwc; in arc_pmu_intr() local
434 hwc = &event->hw; in arc_pmu_intr()
436 WARN_ON_ONCE(hwc->idx != idx); in arc_pmu_intr()
439 perf_sample_data_init(&data, 0, hwc->last_period); in arc_pmu_intr()