From 3df1ffa634c65a91f3888ff3d9761708ff64e314 Mon Sep 17 00:00:00 2001 From: Minda Chen Date: Thu, 2 Mar 2023 17:16:01 +0800 Subject: [PATCH] perf:sbi: disable cpu hotplug callback. register cpu hotplug callback will cause dhrystone and coremark benchmark reduce the scores. this CPU hotplug ops will do in sbi cpu/on and off. So disable this no side effect. Signed-off-by: Minda Chen --- drivers/perf/riscv_pmu_sbi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/perf/riscv_pmu_sbi.c b/drivers/perf/riscv_pmu_sbi.c index 15ab3dc..13902df 100644 --- a/drivers/perf/riscv_pmu_sbi.c +++ b/drivers/perf/riscv_pmu_sbi.c @@ -776,9 +776,11 @@ static int pmu_sbi_device_probe(struct platform_device *pdev) } pdev->dev.groups = pmu_sbi_groups; +#ifndef CONFIG_SOC_STARFIVE ret = cpuhp_state_add_instance(CPUHP_AP_PERF_RISCV_STARTING, &pmu->node); if (ret) return ret; +#endif ret = perf_pmu_register(&pmu->pmu, "cpu", PERF_TYPE_RAW); if (ret) { -- 2.7.4