perf:sbi: disable cpu hotplug callback.
authorMinda Chen <minda.chen@starfivetech.com>
Thu, 2 Mar 2023 09:16:01 +0000 (17:16 +0800)
committerMinda Chen <minda.chen@starfivetech.com>
Thu, 9 Mar 2023 05:50:56 +0000 (13:50 +0800)
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 <minda.chen@starfivetech.com>
drivers/perf/riscv_pmu_sbi.c

index 15ab3dc..13902df 100644 (file)
@@ -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) {