l3pmu 195 drivers/perf/qcom_l3_pmu.c struct l3cache_pmu *l3pmu = to_l3cache_pmu(event->pmu); l3pmu 201 drivers/perf/qcom_l3_pmu.c gang = readl_relaxed(l3pmu->regs + L3_M_BC_GANG); l3pmu 203 drivers/perf/qcom_l3_pmu.c writel_relaxed(gang, l3pmu->regs + L3_M_BC_GANG); l3pmu 207 drivers/perf/qcom_l3_pmu.c writel_relaxed(0, l3pmu->regs + L3_HML3_PM_EVCNTR(idx + 1)); l3pmu 208 drivers/perf/qcom_l3_pmu.c writel_relaxed(0, l3pmu->regs + L3_HML3_PM_EVCNTR(idx)); l3pmu 214 drivers/perf/qcom_l3_pmu.c writel_relaxed(EVSEL(0), l3pmu->regs + L3_HML3_PM_EVTYPE(idx + 1)); l3pmu 215 drivers/perf/qcom_l3_pmu.c writel_relaxed(EVSEL(evsel), l3pmu->regs + L3_HML3_PM_EVTYPE(idx)); l3pmu 218 drivers/perf/qcom_l3_pmu.c writel_relaxed(PMCNT_RESET, l3pmu->regs + L3_HML3_PM_CNTCTL(idx + 1)); l3pmu 219 drivers/perf/qcom_l3_pmu.c writel_relaxed(PMCNTENSET(idx + 1), l3pmu->regs + L3_M_BC_CNTENSET); l3pmu 220 drivers/perf/qcom_l3_pmu.c writel_relaxed(PMCNT_RESET, l3pmu->regs + L3_HML3_PM_CNTCTL(idx)); l3pmu 221 drivers/perf/qcom_l3_pmu.c writel_relaxed(PMCNTENSET(idx), l3pmu->regs + L3_M_BC_CNTENSET); l3pmu 227 drivers/perf/qcom_l3_pmu.c struct l3cache_pmu *l3pmu = to_l3cache_pmu(event->pmu); l3pmu 229 drivers/perf/qcom_l3_pmu.c u32 gang = readl_relaxed(l3pmu->regs + L3_M_BC_GANG); l3pmu 232 drivers/perf/qcom_l3_pmu.c writel_relaxed(PMCNTENCLR(idx), l3pmu->regs + L3_M_BC_CNTENCLR); l3pmu 233 drivers/perf/qcom_l3_pmu.c writel_relaxed(PMCNTENCLR(idx + 1), l3pmu->regs + L3_M_BC_CNTENCLR); l3pmu 236 drivers/perf/qcom_l3_pmu.c writel_relaxed(gang & ~GANG_EN(idx + 1), l3pmu->regs + L3_M_BC_GANG); l3pmu 241 drivers/perf/qcom_l3_pmu.c struct l3cache_pmu *l3pmu = to_l3cache_pmu(event->pmu); l3pmu 249 drivers/perf/qcom_l3_pmu.c hi = readl_relaxed(l3pmu->regs + L3_HML3_PM_EVCNTR(idx + 1)); l3pmu 250 drivers/perf/qcom_l3_pmu.c lo = readl_relaxed(l3pmu->regs + L3_HML3_PM_EVCNTR(idx)); l3pmu 251 drivers/perf/qcom_l3_pmu.c } while (hi != readl_relaxed(l3pmu->regs + L3_HML3_PM_EVCNTR(idx + 1))); l3pmu 276 drivers/perf/qcom_l3_pmu.c struct l3cache_pmu *l3pmu = to_l3cache_pmu(event->pmu); l3pmu 279 drivers/perf/qcom_l3_pmu.c u32 irqctl = readl_relaxed(l3pmu->regs + L3_M_BC_IRQCTL); l3pmu 282 drivers/perf/qcom_l3_pmu.c writel_relaxed(irqctl | PMIRQONMSBEN(idx), l3pmu->regs + L3_M_BC_IRQCTL); l3pmu 286 drivers/perf/qcom_l3_pmu.c writel_relaxed(0, l3pmu->regs + L3_HML3_PM_EVCNTR(idx)); l3pmu 289 drivers/perf/qcom_l3_pmu.c writel_relaxed(EVSEL(evsel), l3pmu->regs + L3_HML3_PM_EVTYPE(idx)); l3pmu 292 drivers/perf/qcom_l3_pmu.c writel_relaxed(PMINTENSET(idx), l3pmu->regs + L3_M_BC_INTENSET); l3pmu 295 drivers/perf/qcom_l3_pmu.c writel_relaxed(PMCNT_RESET, l3pmu->regs + L3_HML3_PM_CNTCTL(idx)); l3pmu 296 drivers/perf/qcom_l3_pmu.c writel_relaxed(PMCNTENSET(idx), l3pmu->regs + L3_M_BC_CNTENSET); l3pmu 302 drivers/perf/qcom_l3_pmu.c struct l3cache_pmu *l3pmu = to_l3cache_pmu(event->pmu); l3pmu 304 drivers/perf/qcom_l3_pmu.c u32 irqctl = readl_relaxed(l3pmu->regs + L3_M_BC_IRQCTL); l3pmu 307 drivers/perf/qcom_l3_pmu.c writel_relaxed(PMCNTENCLR(idx), l3pmu->regs + L3_M_BC_CNTENCLR); l3pmu 310 drivers/perf/qcom_l3_pmu.c writel_relaxed(PMINTENCLR(idx), l3pmu->regs + L3_M_BC_INTENCLR); l3pmu 313 drivers/perf/qcom_l3_pmu.c writel_relaxed(irqctl & ~PMIRQONMSBEN(idx), l3pmu->regs + L3_M_BC_IRQCTL); l3pmu 318 drivers/perf/qcom_l3_pmu.c struct l3cache_pmu *l3pmu = to_l3cache_pmu(event->pmu); l3pmu 324 drivers/perf/qcom_l3_pmu.c new = readl_relaxed(l3pmu->regs + L3_HML3_PM_EVCNTR(idx)); l3pmu 350 drivers/perf/qcom_l3_pmu.c static inline void qcom_l3_cache__init(struct l3cache_pmu *l3pmu) l3pmu 354 drivers/perf/qcom_l3_pmu.c writel_relaxed(BC_RESET, l3pmu->regs + L3_M_BC_CR); l3pmu 360 drivers/perf/qcom_l3_pmu.c writel(BC_SATROLL_CR_RESET, l3pmu->regs + L3_M_BC_SATROLL_CR); l3pmu 362 drivers/perf/qcom_l3_pmu.c writel_relaxed(BC_CNTENCLR_RESET, l3pmu->regs + L3_M_BC_CNTENCLR); l3pmu 363 drivers/perf/qcom_l3_pmu.c writel_relaxed(BC_INTENCLR_RESET, l3pmu->regs + L3_M_BC_INTENCLR); l3pmu 364 drivers/perf/qcom_l3_pmu.c writel_relaxed(PMOVSRCLR_RESET, l3pmu->regs + L3_M_BC_OVSR); l3pmu 365 drivers/perf/qcom_l3_pmu.c writel_relaxed(BC_GANG_RESET, l3pmu->regs + L3_M_BC_GANG); l3pmu 366 drivers/perf/qcom_l3_pmu.c writel_relaxed(BC_IRQCTL_RESET, l3pmu->regs + L3_M_BC_IRQCTL); l3pmu 367 drivers/perf/qcom_l3_pmu.c writel_relaxed(PM_CR_RESET, l3pmu->regs + L3_HML3_PM_CR); l3pmu 370 drivers/perf/qcom_l3_pmu.c writel_relaxed(PMCNT_RESET, l3pmu->regs + L3_HML3_PM_CNTCTL(i)); l3pmu 371 drivers/perf/qcom_l3_pmu.c writel_relaxed(EVSEL(0), l3pmu->regs + L3_HML3_PM_EVTYPE(i)); l3pmu 374 drivers/perf/qcom_l3_pmu.c writel_relaxed(PM_FLTR_RESET, l3pmu->regs + L3_HML3_PM_FILTRA); l3pmu 375 drivers/perf/qcom_l3_pmu.c writel_relaxed(PM_FLTR_RESET, l3pmu->regs + L3_HML3_PM_FILTRAM); l3pmu 376 drivers/perf/qcom_l3_pmu.c writel_relaxed(PM_FLTR_RESET, l3pmu->regs + L3_HML3_PM_FILTRB); l3pmu 377 drivers/perf/qcom_l3_pmu.c writel_relaxed(PM_FLTR_RESET, l3pmu->regs + L3_HML3_PM_FILTRBM); l3pmu 378 drivers/perf/qcom_l3_pmu.c writel_relaxed(PM_FLTR_RESET, l3pmu->regs + L3_HML3_PM_FILTRC); l3pmu 379 drivers/perf/qcom_l3_pmu.c writel_relaxed(PM_FLTR_RESET, l3pmu->regs + L3_HML3_PM_FILTRCM); l3pmu 385 drivers/perf/qcom_l3_pmu.c writel(BC_ENABLE, l3pmu->regs + L3_M_BC_CR); l3pmu 390 drivers/perf/qcom_l3_pmu.c struct l3cache_pmu *l3pmu = data; l3pmu 392 drivers/perf/qcom_l3_pmu.c long status = readl_relaxed(l3pmu->regs + L3_M_BC_OVSR); l3pmu 399 drivers/perf/qcom_l3_pmu.c writel_relaxed(status, l3pmu->regs + L3_M_BC_OVSR); l3pmu 405 drivers/perf/qcom_l3_pmu.c event = l3pmu->events[idx]; l3pmu 429 drivers/perf/qcom_l3_pmu.c struct l3cache_pmu *l3pmu = to_l3cache_pmu(pmu); l3pmu 434 drivers/perf/qcom_l3_pmu.c writel_relaxed(BC_ENABLE, l3pmu->regs + L3_M_BC_CR); l3pmu 439 drivers/perf/qcom_l3_pmu.c struct l3cache_pmu *l3pmu = to_l3cache_pmu(pmu); l3pmu 441 drivers/perf/qcom_l3_pmu.c writel_relaxed(0, l3pmu->regs + L3_M_BC_CR); l3pmu 480 drivers/perf/qcom_l3_pmu.c struct l3cache_pmu *l3pmu = to_l3cache_pmu(event->pmu); l3pmu 519 drivers/perf/qcom_l3_pmu.c event->cpu = cpumask_first(&l3pmu->cpumask); l3pmu 549 drivers/perf/qcom_l3_pmu.c struct l3cache_pmu *l3pmu = to_l3cache_pmu(event->pmu); l3pmu 557 drivers/perf/qcom_l3_pmu.c idx = bitmap_find_free_region(l3pmu->used_mask, L3_NUM_COUNTERS, order); l3pmu 564 drivers/perf/qcom_l3_pmu.c l3pmu->events[idx] = event; l3pmu 577 drivers/perf/qcom_l3_pmu.c struct l3cache_pmu *l3pmu = to_l3cache_pmu(event->pmu); l3pmu 583 drivers/perf/qcom_l3_pmu.c l3pmu->events[hwc->idx] = NULL; l3pmu 584 drivers/perf/qcom_l3_pmu.c bitmap_release_region(l3pmu->used_mask, hwc->idx, order); l3pmu 676 drivers/perf/qcom_l3_pmu.c struct l3cache_pmu *l3pmu = to_l3cache_pmu(dev_get_drvdata(dev)); l3pmu 678 drivers/perf/qcom_l3_pmu.c return cpumap_print_to_pagebuf(true, buf, &l3pmu->cpumask); l3pmu 708 drivers/perf/qcom_l3_pmu.c struct l3cache_pmu *l3pmu = hlist_entry_safe(node, struct l3cache_pmu, node); l3pmu 711 drivers/perf/qcom_l3_pmu.c if (cpumask_empty(&l3pmu->cpumask)) l3pmu 712 drivers/perf/qcom_l3_pmu.c cpumask_set_cpu(cpu, &l3pmu->cpumask); l3pmu 719 drivers/perf/qcom_l3_pmu.c struct l3cache_pmu *l3pmu = hlist_entry_safe(node, struct l3cache_pmu, node); l3pmu 722 drivers/perf/qcom_l3_pmu.c if (!cpumask_test_and_clear_cpu(cpu, &l3pmu->cpumask)) l3pmu 727 drivers/perf/qcom_l3_pmu.c perf_pmu_migrate_context(&l3pmu->pmu, cpu, target); l3pmu 728 drivers/perf/qcom_l3_pmu.c cpumask_set_cpu(target, &l3pmu->cpumask); l3pmu 734 drivers/perf/qcom_l3_pmu.c struct l3cache_pmu *l3pmu; l3pmu 746 drivers/perf/qcom_l3_pmu.c l3pmu = devm_kzalloc(&pdev->dev, sizeof(*l3pmu), GFP_KERNEL); l3pmu 749 drivers/perf/qcom_l3_pmu.c if (!l3pmu || !name) l3pmu 752 drivers/perf/qcom_l3_pmu.c l3pmu->pmu = (struct pmu) { l3pmu 769 drivers/perf/qcom_l3_pmu.c l3pmu->regs = devm_ioremap_resource(&pdev->dev, memrc); l3pmu 770 drivers/perf/qcom_l3_pmu.c if (IS_ERR(l3pmu->regs)) { l3pmu 772 drivers/perf/qcom_l3_pmu.c return PTR_ERR(l3pmu->regs); l3pmu 775 drivers/perf/qcom_l3_pmu.c qcom_l3_cache__init(l3pmu); l3pmu 782 drivers/perf/qcom_l3_pmu.c name, l3pmu); l3pmu 790 drivers/perf/qcom_l3_pmu.c ret = cpuhp_state_add_instance(CPUHP_AP_PERF_ARM_QCOM_L3_ONLINE, &l3pmu->node); l3pmu 796 drivers/perf/qcom_l3_pmu.c ret = perf_pmu_register(&l3pmu->pmu, name, -1); l3pmu 802 drivers/perf/qcom_l3_pmu.c dev_info(&pdev->dev, "Registered %s, type: %d\n", name, l3pmu->pmu.type);