Lines Matching defs:tad_pmu
7 #define pr_fmt(fmt) "tad_pmu: " fmt
24 #define to_tad_pmu(p) (container_of(p, struct tad_pmu, pmu))
30 struct tad_pmu {
53 struct tad_pmu *tad_pmu = to_tad_pmu(event->pmu);
61 for (i = 0, new = 0; i < tad_pmu->region_cnt; i++)
62 new += readq(tad_pmu->regions[i].base +
71 struct tad_pmu *tad_pmu = to_tad_pmu(event->pmu);
79 for (i = 0; i < tad_pmu->region_cnt; i++) {
80 writeq_relaxed(0, tad_pmu->regions[i].base +
90 struct tad_pmu *tad_pmu = to_tad_pmu(event->pmu);
100 for (i = 0; i < tad_pmu->region_cnt; i++)
101 writeq_relaxed(0, tad_pmu->regions[i].base +
107 for (i = 0; i < tad_pmu->region_cnt; i++) {
109 writeq_relaxed(reg_val, tad_pmu->regions[i].base +
116 struct tad_pmu *tad_pmu = to_tad_pmu(event->pmu);
121 tad_pmu->events[idx] = NULL;
122 clear_bit(idx, tad_pmu->counters_map);
127 struct tad_pmu *tad_pmu = to_tad_pmu(event->pmu);
132 idx = find_first_zero_bit(tad_pmu->counters_map, TAD_MAX_COUNTERS);
136 set_bit(idx, tad_pmu->counters_map);
140 tad_pmu->events[idx] = event;
150 struct tad_pmu *tad_pmu = to_tad_pmu(event->pmu);
161 event->cpu = tad_pmu->cpu;
259 struct tad_pmu *tad_pmu = to_tad_pmu(dev_get_drvdata(dev));
261 return cpumap_print_to_pagebuf(true, buf, cpumask_of(tad_pmu->cpu));
294 struct tad_pmu *tad_pmu;
303 tad_pmu = devm_kzalloc(&pdev->dev, sizeof(*tad_pmu), GFP_KERNEL);
304 if (!tad_pmu)
307 platform_set_drvdata(pdev, tad_pmu);
359 tad_pmu->regions = regions;
360 tad_pmu->region_cnt = tad_cnt;
362 tad_pmu->pmu = (struct pmu) {
378 tad_pmu->pmu.attr_groups = tad_pmu_attr_groups;
380 tad_pmu->pmu.attr_groups = ody_tad_pmu_attr_groups;
382 tad_pmu->cpu = raw_smp_processor_id();
386 &tad_pmu->node);
393 ret = perf_pmu_register(&tad_pmu->pmu, name, -1);
396 &tad_pmu->node);
403 struct tad_pmu *pmu = platform_get_drvdata(pdev);
451 struct tad_pmu *pmu = hlist_entry_safe(node, struct tad_pmu, node);