Lines Matching refs:hwc
281 struct hw_perf_event *hwc, int idx) in arc_perf_event_update() argument
283 u64 prev_raw_count = local64_read(&hwc->prev_count); in arc_perf_event_update()
291 local64_set(&hwc->prev_count, new_raw_count); in arc_perf_event_update()
293 local64_sub(delta, &hwc->period_left); in arc_perf_event_update()
331 struct hw_perf_event *hwc = &event->hw; in arc_pmu_event_init() local
335 hwc->sample_period = arc_pmu->max_period; in arc_pmu_event_init()
336 hwc->last_period = hwc->sample_period; in arc_pmu_event_init()
337 local64_set(&hwc->period_left, hwc->sample_period); in arc_pmu_event_init()
340 hwc->config = 0; in arc_pmu_event_init()
345 hwc->config |= ARC_REG_PCT_CONFIG_KERN; in arc_pmu_event_init()
349 hwc->config |= ARC_REG_PCT_CONFIG_USER; in arc_pmu_event_init()
358 hwc->config |= arc_pmu->ev_hw_idx[event->attr.config]; in arc_pmu_event_init()
360 (int)event->attr.config, (int)hwc->config, in arc_pmu_event_init()
368 hwc->config |= arc_pmu->ev_hw_idx[ret]; in arc_pmu_event_init()
370 (int)hwc->config, arc_pmu_ev_hw_map[ret]); in arc_pmu_event_init()
377 hwc->config |= event->attr.config; in arc_pmu_event_init()
407 struct hw_perf_event *hwc = &event->hw; in arc_pmu_event_set_period() local
408 s64 left = local64_read(&hwc->period_left); in arc_pmu_event_set_period()
409 s64 period = hwc->sample_period; in arc_pmu_event_set_period()
410 int idx = hwc->idx; in arc_pmu_event_set_period()
417 local64_set(&hwc->period_left, left); in arc_pmu_event_set_period()
418 hwc->last_period = period; in arc_pmu_event_set_period()
423 local64_set(&hwc->period_left, left); in arc_pmu_event_set_period()
424 hwc->last_period = period; in arc_pmu_event_set_period()
432 local64_set(&hwc->prev_count, value); in arc_pmu_event_set_period()
453 struct hw_perf_event *hwc = &event->hw; in arc_pmu_start() local
454 int idx = hwc->idx; in arc_pmu_start()
460 WARN_ON_ONCE(!(hwc->state & PERF_HES_UPTODATE)); in arc_pmu_start()
462 hwc->state = 0; in arc_pmu_start()
473 write_aux_reg(ARC_REG_PCT_CONFIG, hwc->config); /* condition */ in arc_pmu_start()
478 struct hw_perf_event *hwc = &event->hw; in arc_pmu_stop() local
479 int idx = hwc->idx; in arc_pmu_stop()
525 struct hw_perf_event *hwc = &event->hw; in arc_pmu_add() local
533 hwc->idx = idx; in arc_pmu_add()
550 local64_set(&hwc->prev_count, 0); in arc_pmu_add()
552 hwc->state = PERF_HES_UPTODATE | PERF_HES_STOPPED; in arc_pmu_add()
580 struct hw_perf_event *hwc; in arc_pmu_intr() local
596 hwc = &event->hw; in arc_pmu_intr()
598 WARN_ON_ONCE(hwc->idx != idx); in arc_pmu_intr()
601 perf_sample_data_init(&data, 0, hwc->last_period); in arc_pmu_intr()