Lines Matching refs:event

143 	static inline u32 get_##_name(struct perf_event *event)            \
146 event->attr._config); \
149 SMMU_PMU_EVENT_ATTR_EXTRACTOR(event, config, 0, 15);
164 struct perf_event *event, int idx);
254 static void smmu_pmu_event_update(struct perf_event *event) in smmu_pmu_event_update() argument
256 struct hw_perf_event *hwc = &event->hw; in smmu_pmu_event_update()
257 struct smmu_pmu *smmu_pmu = to_smmu_pmu(event->pmu); in smmu_pmu_event_update()
270 local64_add(delta, &event->count); in smmu_pmu_event_update()
302 static void smmu_pmu_set_event_filter(struct perf_event *event, in smmu_pmu_set_event_filter() argument
305 struct smmu_pmu *smmu_pmu = to_smmu_pmu(event->pmu); in smmu_pmu_set_event_filter()
308 evtyper = get_event(event) | span << SMMU_PMCG_SID_SPAN_SHIFT; in smmu_pmu_set_event_filter()
327 struct perf_event *event, int idx) in smmu_pmu_apply_event_filter() argument
331 bool filter_en = !!get_filter_enable(event); in smmu_pmu_apply_event_filter()
333 span = filter_en ? get_filter_span(event) : in smmu_pmu_apply_event_filter()
335 sid = filter_en ? get_filter_stream_id(event) : in smmu_pmu_apply_event_filter()
344 smmu_pmu_set_event_filter(event, idx, span, sid); in smmu_pmu_apply_event_filter()
349 if (smmu_pmu_check_global_filter(smmu_pmu->events[cur_idx], event)) { in smmu_pmu_apply_event_filter()
350 smmu_pmu_set_evtyper(smmu_pmu, idx, get_event(event)); in smmu_pmu_apply_event_filter()
358 struct perf_event *event) in smmu_pmu_get_event_idx() argument
368 err = smmu_pmu_apply_event_filter(smmu_pmu, event, idx); in smmu_pmu_get_event_idx()
395 static int smmu_pmu_event_init(struct perf_event *event) in smmu_pmu_event_init() argument
397 struct hw_perf_event *hwc = &event->hw; in smmu_pmu_event_init()
398 struct smmu_pmu *smmu_pmu = to_smmu_pmu(event->pmu); in smmu_pmu_event_init()
404 if (event->attr.type != event->pmu->type) in smmu_pmu_event_init()
412 if (event->cpu < 0) { in smmu_pmu_event_init()
418 event_id = get_event(event); in smmu_pmu_event_init()
426 if (!is_software_event(event->group_leader)) { in smmu_pmu_event_init()
427 if (!smmu_pmu_events_compatible(event->group_leader, event)) in smmu_pmu_event_init()
434 for_each_sibling_event(sibling, event->group_leader) { in smmu_pmu_event_init()
438 if (!smmu_pmu_events_compatible(sibling, event)) in smmu_pmu_event_init()
451 event->cpu = smmu_pmu->on_cpu; in smmu_pmu_event_init()
456 static void smmu_pmu_event_start(struct perf_event *event, int flags) in smmu_pmu_event_start() argument
458 struct smmu_pmu *smmu_pmu = to_smmu_pmu(event->pmu); in smmu_pmu_event_start()
459 struct hw_perf_event *hwc = &event->hw; in smmu_pmu_event_start()
469 static void smmu_pmu_event_stop(struct perf_event *event, int flags) in smmu_pmu_event_stop() argument
471 struct smmu_pmu *smmu_pmu = to_smmu_pmu(event->pmu); in smmu_pmu_event_stop()
472 struct hw_perf_event *hwc = &event->hw; in smmu_pmu_event_stop()
480 smmu_pmu_event_update(event); in smmu_pmu_event_stop()
484 static int smmu_pmu_event_add(struct perf_event *event, int flags) in smmu_pmu_event_add() argument
486 struct hw_perf_event *hwc = &event->hw; in smmu_pmu_event_add()
488 struct smmu_pmu *smmu_pmu = to_smmu_pmu(event->pmu); in smmu_pmu_event_add()
490 idx = smmu_pmu_get_event_idx(smmu_pmu, event); in smmu_pmu_event_add()
496 smmu_pmu->events[idx] = event; in smmu_pmu_event_add()
502 smmu_pmu_event_start(event, flags); in smmu_pmu_event_add()
505 perf_event_update_userpage(event); in smmu_pmu_event_add()
510 static void smmu_pmu_event_del(struct perf_event *event, int flags) in smmu_pmu_event_del() argument
512 struct hw_perf_event *hwc = &event->hw; in smmu_pmu_event_del()
513 struct smmu_pmu *smmu_pmu = to_smmu_pmu(event->pmu); in smmu_pmu_event_del()
516 smmu_pmu_event_stop(event, flags | PERF_EF_UPDATE); in smmu_pmu_event_del()
521 perf_event_update_userpage(event); in smmu_pmu_event_del()
524 static void smmu_pmu_event_read(struct perf_event *event) in smmu_pmu_event_read() argument
526 smmu_pmu_event_update(event); in smmu_pmu_event_read()
635 PMU_FORMAT_ATTR(event, "config:0-15");
700 struct perf_event *event = smmu_pmu->events[idx]; in smmu_pmu_handle_irq() local
703 if (WARN_ON_ONCE(!event)) in smmu_pmu_handle_irq()
706 smmu_pmu_event_update(event); in smmu_pmu_handle_irq()
707 hwc = &event->hw; in smmu_pmu_handle_irq()