Lines Matching refs:event

84 	const char *event;  member
90 struct amd_iommu_event_desc *event = in _iommu_event_show() local
92 return sprintf(buf, "%s\n", event->event); in _iommu_event_show()
98 .event = _event, \
197 static int perf_iommu_event_init(struct perf_event *event) in perf_iommu_event_init() argument
199 struct hw_perf_event *hwc = &event->hw; in perf_iommu_event_init()
204 if (event->attr.type != event->pmu->type) in perf_iommu_event_init()
212 if (is_sampling_event(event) || event->attach_state & PERF_ATTACH_TASK) in perf_iommu_event_init()
216 if (event->attr.exclude_user || event->attr.exclude_kernel || in perf_iommu_event_init()
217 event->attr.exclude_host || event->attr.exclude_guest) in perf_iommu_event_init()
220 if (event->cpu < 0) in perf_iommu_event_init()
225 if (event->pmu != &perf_iommu->pmu) in perf_iommu_event_init()
229 config = event->attr.config; in perf_iommu_event_init()
230 config1 = event->attr.config1; in perf_iommu_event_init()
283 static void perf_iommu_disable_event(struct perf_event *event) in perf_iommu_disable_event() argument
287 amd_iommu_pc_get_set_reg_val(_GET_DEVID(event), in perf_iommu_disable_event()
288 _GET_BANK(event), _GET_CNTR(event), in perf_iommu_disable_event()
292 static void perf_iommu_start(struct perf_event *event, int flags) in perf_iommu_start() argument
294 struct hw_perf_event *hwc = &event->hw; in perf_iommu_start()
305 amd_iommu_pc_get_set_reg_val(_GET_DEVID(event), in perf_iommu_start()
306 _GET_BANK(event), _GET_CNTR(event), in perf_iommu_start()
310 perf_iommu_enable_event(event); in perf_iommu_start()
311 perf_event_update_userpage(event); in perf_iommu_start()
315 static void perf_iommu_read(struct perf_event *event) in perf_iommu_read() argument
320 struct hw_perf_event *hwc = &event->hw; in perf_iommu_read()
323 amd_iommu_pc_get_set_reg_val(_GET_DEVID(event), in perf_iommu_read()
324 _GET_BANK(event), _GET_CNTR(event), in perf_iommu_read()
338 local64_add(delta, &event->count); in perf_iommu_read()
342 static void perf_iommu_stop(struct perf_event *event, int flags) in perf_iommu_stop() argument
344 struct hw_perf_event *hwc = &event->hw; in perf_iommu_stop()
352 perf_iommu_disable_event(event); in perf_iommu_stop()
360 perf_iommu_read(event); in perf_iommu_stop()
364 static int perf_iommu_add(struct perf_event *event, int flags) in perf_iommu_add() argument
368 container_of(event->pmu, struct perf_amd_iommu, pmu); in perf_iommu_add()
371 event->hw.state = PERF_HES_UPTODATE | PERF_HES_STOPPED; in perf_iommu_add()
376 event->hw.extra_reg.reg = (u16)retval; in perf_iommu_add()
381 perf_iommu_start(event, PERF_EF_RELOAD); in perf_iommu_add()
386 static void perf_iommu_del(struct perf_event *event, int flags) in perf_iommu_del() argument
389 container_of(event->pmu, struct perf_amd_iommu, pmu); in perf_iommu_del()
392 perf_iommu_stop(event, PERF_EF_UPDATE); in perf_iommu_del()
396 _GET_BANK(event), in perf_iommu_del()
397 _GET_CNTR(event)); in perf_iommu_del()
399 perf_event_update_userpage(event); in perf_iommu_del()