Lines Matching refs:pmu
110 static void pmu_legacy_init(struct riscv_pmu *pmu) in pmu_legacy_init() argument
114 pmu->cmask = BIT(RISCV_PMU_LEGACY_CYCLE) | in pmu_legacy_init()
116 pmu->ctr_start = pmu_legacy_ctr_start; in pmu_legacy_init()
117 pmu->ctr_stop = NULL; in pmu_legacy_init()
118 pmu->event_map = pmu_legacy_event_map; in pmu_legacy_init()
119 pmu->ctr_get_idx = pmu_legacy_ctr_get_idx; in pmu_legacy_init()
120 pmu->ctr_get_width = pmu_legacy_ctr_get_width; in pmu_legacy_init()
121 pmu->ctr_clear_idx = NULL; in pmu_legacy_init()
122 pmu->ctr_read = pmu_legacy_read_ctr; in pmu_legacy_init()
123 pmu->event_mapped = pmu_legacy_event_mapped; in pmu_legacy_init()
124 pmu->event_unmapped = pmu_legacy_event_unmapped; in pmu_legacy_init()
125 pmu->csr_index = pmu_legacy_csr_index; in pmu_legacy_init()
126 pmu->pmu.capabilities |= PERF_PMU_CAP_NO_INTERRUPT; in pmu_legacy_init()
127 pmu->pmu.capabilities |= PERF_PMU_CAP_NO_EXCLUDE; in pmu_legacy_init()
129 perf_pmu_register(&pmu->pmu, "cpu", PERF_TYPE_RAW); in pmu_legacy_init()
134 struct riscv_pmu *pmu = NULL; in pmu_legacy_device_probe() local
136 pmu = riscv_pmu_alloc(); in pmu_legacy_device_probe()
137 if (!pmu) in pmu_legacy_device_probe()
139 pmu_legacy_init(pmu); in pmu_legacy_device_probe()