[PATCH v2 04/10] drivers: perf: Rename riscv pmu driver
Andrew Jones
ajones at ventanamicro.com
Wed May 31 07:09:28 PDT 2023
On Fri, May 12, 2023 at 10:53:15AM +0200, Alexandre Ghiti wrote:
> In addition to being more pretty, it will be useful in upcoming commits
> to distinguish those pmu drivers from the other pmu drivers.
>
> Signed-off-by: Alexandre Ghiti <alexghiti at rivosinc.com>
> ---
> drivers/perf/riscv_pmu_legacy.c | 2 +-
> drivers/perf/riscv_pmu_sbi.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/perf/riscv_pmu_legacy.c b/drivers/perf/riscv_pmu_legacy.c
> index 0d8c9d8849ee..ffe09d857366 100644
> --- a/drivers/perf/riscv_pmu_legacy.c
> +++ b/drivers/perf/riscv_pmu_legacy.c
> @@ -95,7 +95,7 @@ static void pmu_legacy_init(struct riscv_pmu *pmu)
> pmu->ctr_clear_idx = NULL;
> pmu->ctr_read = pmu_legacy_read_ctr;
>
> - perf_pmu_register(&pmu->pmu, "cpu", PERF_TYPE_RAW);
> + perf_pmu_register(&pmu->pmu, RISCV_PMU_LEGACY_PDEV_NAME, PERF_TYPE_RAW);
> }
>
> static int pmu_legacy_device_probe(struct platform_device *pdev)
> diff --git a/drivers/perf/riscv_pmu_sbi.c b/drivers/perf/riscv_pmu_sbi.c
> index 70cb50fd41c2..3b0ee2148054 100644
> --- a/drivers/perf/riscv_pmu_sbi.c
> +++ b/drivers/perf/riscv_pmu_sbi.c
> @@ -897,7 +897,7 @@ static int pmu_sbi_device_probe(struct platform_device *pdev)
> if (ret)
> goto out_unregister;
>
> - ret = perf_pmu_register(&pmu->pmu, "cpu", PERF_TYPE_RAW);
> + ret = perf_pmu_register(&pmu->pmu, RISCV_PMU_PDEV_NAME, PERF_TYPE_RAW);
Should we include "sbi" in this name?
> if (ret)
> goto out_unregister;
>
> --
> 2.37.2
>
Otherwise,
Reviewed-by: Andrew Jones <ajones at ventanamicro.com>
More information about the linux-arm-kernel
mailing list