drivers: perf: Do not broadcast to other cpus when starting a counter
[platform/kernel/linux-starfive.git] / drivers / perf / riscv_pmu_sbi.c
index 96c7f67..fcb0c70 100644 (file)
@@ -543,8 +543,7 @@ static void pmu_sbi_ctr_start(struct perf_event *event, u64 ival)
 
        if ((hwc->flags & PERF_EVENT_FLAG_USER_ACCESS) &&
            (hwc->flags & PERF_EVENT_FLAG_USER_READ_CNT))
-               on_each_cpu_mask(mm_cpumask(event->owner->mm),
-                                pmu_sbi_set_scounteren, (void *)event, 1);
+               pmu_sbi_set_scounteren((void *)event);
 }
 
 static void pmu_sbi_ctr_stop(struct perf_event *event, unsigned long flag)
@@ -554,8 +553,7 @@ static void pmu_sbi_ctr_stop(struct perf_event *event, unsigned long flag)
 
        if ((hwc->flags & PERF_EVENT_FLAG_USER_ACCESS) &&
            (hwc->flags & PERF_EVENT_FLAG_USER_READ_CNT))
-               on_each_cpu_mask(mm_cpumask(event->owner->mm),
-                                pmu_sbi_reset_scounteren, (void *)event, 1);
+               pmu_sbi_reset_scounteren((void *)event);
 
        ret = sbi_ecall(SBI_EXT_PMU, SBI_EXT_PMU_COUNTER_STOP, hwc->idx, 1, flag, 0, 0, 0);
        if (ret.error && (ret.error != SBI_ERR_ALREADY_STOPPED) &&