Lines Matching refs:tad_pmu
24 #define to_tad_pmu(p) (container_of(p, struct tad_pmu, pmu))
30 struct tad_pmu { struct
44 struct tad_pmu *tad_pmu = to_tad_pmu(event->pmu); in tad_pmu_event_counter_read() argument
52 for (i = 0, new = 0; i < tad_pmu->region_cnt; i++) in tad_pmu_event_counter_read()
53 new += readq(tad_pmu->regions[i].base + in tad_pmu_event_counter_read()
62 struct tad_pmu *tad_pmu = to_tad_pmu(event->pmu); in tad_pmu_event_counter_stop() local
70 for (i = 0; i < tad_pmu->region_cnt; i++) { in tad_pmu_event_counter_stop()
71 writeq_relaxed(0, tad_pmu->regions[i].base + in tad_pmu_event_counter_stop()
81 struct tad_pmu *tad_pmu = to_tad_pmu(event->pmu); in tad_pmu_event_counter_start() local
91 for (i = 0; i < tad_pmu->region_cnt; i++) in tad_pmu_event_counter_start()
92 writeq_relaxed(0, tad_pmu->regions[i].base + in tad_pmu_event_counter_start()
98 for (i = 0; i < tad_pmu->region_cnt; i++) { in tad_pmu_event_counter_start()
100 writeq_relaxed(reg_val, tad_pmu->regions[i].base + in tad_pmu_event_counter_start()
107 struct tad_pmu *tad_pmu = to_tad_pmu(event->pmu); in tad_pmu_event_counter_del() local
112 tad_pmu->events[idx] = NULL; in tad_pmu_event_counter_del()
113 clear_bit(idx, tad_pmu->counters_map); in tad_pmu_event_counter_del()
118 struct tad_pmu *tad_pmu = to_tad_pmu(event->pmu); in tad_pmu_event_counter_add() local
123 idx = find_first_zero_bit(tad_pmu->counters_map, TAD_MAX_COUNTERS); in tad_pmu_event_counter_add()
127 set_bit(idx, tad_pmu->counters_map); in tad_pmu_event_counter_add()
131 tad_pmu->events[idx] = event; in tad_pmu_event_counter_add()
141 struct tad_pmu *tad_pmu = to_tad_pmu(event->pmu); in tad_pmu_event_init() local
152 event->cpu = tad_pmu->cpu; in tad_pmu_event_init()
232 struct tad_pmu *tad_pmu = to_tad_pmu(dev_get_drvdata(dev)); in tad_pmu_cpumask_show() local
234 return cpumap_print_to_pagebuf(true, buf, cpumask_of(tad_pmu->cpu)); in tad_pmu_cpumask_show()
259 struct tad_pmu *tad_pmu; in tad_pmu_probe() local
267 tad_pmu = devm_kzalloc(&pdev->dev, sizeof(*tad_pmu), GFP_KERNEL); in tad_pmu_probe()
268 if (!tad_pmu) in tad_pmu_probe()
271 platform_set_drvdata(pdev, tad_pmu); in tad_pmu_probe()
316 tad_pmu->regions = regions; in tad_pmu_probe()
317 tad_pmu->region_cnt = tad_cnt; in tad_pmu_probe()
319 tad_pmu->pmu = (struct pmu) { in tad_pmu_probe()
335 tad_pmu->cpu = raw_smp_processor_id(); in tad_pmu_probe()
339 &tad_pmu->node); in tad_pmu_probe()
346 ret = perf_pmu_register(&tad_pmu->pmu, name, -1); in tad_pmu_probe()
349 &tad_pmu->node); in tad_pmu_probe()
356 struct tad_pmu *pmu = platform_get_drvdata(pdev); in tad_pmu_remove()
393 struct tad_pmu *pmu = hlist_entry_safe(node, struct tad_pmu, node); in tad_pmu_offline_cpu()