Lines Matching refs:hwc
412 struct hw_perf_event *hwc = &event->hw; in tile_pmu_enable_event() local
414 int shift, idx = hwc->idx; in tile_pmu_enable_event()
447 cfg |= hwc->config << shift; in tile_pmu_enable_event()
461 struct hw_perf_event *hwc = &event->hw; in tile_pmu_disable_event() local
463 int idx = hwc->idx; in tile_pmu_disable_event()
504 struct hw_perf_event *hwc = &event->hw; in tile_perf_event_update() local
508 int idx = hwc->idx; in tile_perf_event_update()
519 prev_raw_count = local64_read(&hwc->prev_count); in tile_perf_event_update()
522 oldval = local64_cmpxchg(&hwc->prev_count, prev_raw_count, in tile_perf_event_update()
539 local64_sub(delta, &hwc->period_left); in tile_perf_event_update()
550 struct hw_perf_event *hwc = &event->hw; in tile_event_set_period() local
551 int idx = hwc->idx; in tile_event_set_period()
552 s64 left = local64_read(&hwc->period_left); in tile_event_set_period()
553 s64 period = hwc->sample_period; in tile_event_set_period()
561 local64_set(&hwc->period_left, left); in tile_event_set_period()
562 hwc->last_period = period; in tile_event_set_period()
568 local64_set(&hwc->period_left, left); in tile_event_set_period()
569 hwc->last_period = period; in tile_event_set_period()
579 local64_set(&hwc->prev_count, (u64)-left); in tile_event_set_period()
594 struct hw_perf_event *hwc = &event->hw; in tile_pmu_stop() local
595 int idx = hwc->idx; in tile_pmu_stop()
599 cpuc->events[hwc->idx] = NULL; in tile_pmu_stop()
600 WARN_ON_ONCE(hwc->state & PERF_HES_STOPPED); in tile_pmu_stop()
601 hwc->state |= PERF_HES_STOPPED; in tile_pmu_stop()
604 if ((flags & PERF_EF_UPDATE) && !(hwc->state & PERF_HES_UPTODATE)) { in tile_pmu_stop()
610 hwc->state |= PERF_HES_UPTODATE; in tile_pmu_stop()
654 struct hw_perf_event *hwc; in tile_pmu_add() local
658 hwc = &event->hw; in tile_pmu_add()
669 hwc->state = PERF_HES_UPTODATE | PERF_HES_STOPPED; in tile_pmu_add()
671 hwc->state |= PERF_HES_ARCH; in tile_pmu_add()
791 struct hw_perf_event *hwc = &event->hw; in __tile_event_init() local
812 hwc->config = code; in __tile_event_init()
813 hwc->idx = -1; in __tile_event_init()
816 hwc->config |= TILE_CTL_EXCL_USER; in __tile_event_init()
819 hwc->config |= TILE_CTL_EXCL_KERNEL; in __tile_event_init()
822 hwc->config |= TILE_CTL_EXCL_HV; in __tile_event_init()
824 if (!hwc->sample_period) { in __tile_event_init()
825 hwc->sample_period = tile_pmu->max_period; in __tile_event_init()
826 hwc->last_period = hwc->sample_period; in __tile_event_init()
827 local64_set(&hwc->period_left, hwc->sample_period); in __tile_event_init()
885 struct hw_perf_event *hwc; in tile_pmu_handle_irq() local
908 hwc = &event->hw; in tile_pmu_handle_irq()