Skip to content

Commit

Permalink
perf: arm_v7_pmu: Don't disable counter in (armv7|krait_|scorpion_)pm…
Browse files Browse the repository at this point in the history
…u_enable_event()

Currently (armv7|krait_|scorpion_)pmu_enable_event() start by disabling
the event counter it has been asked to enable. This should not be
necessary as the counter (and the PMU as a whole) should not be active
when *_enable_event() is called.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Tested-by: James Clark <james.clark@linaro.org>
Link: https://lore.kernel.org/r/20250218-arm-brbe-v19-v20-5-4e9922fc2e8e@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
  • Loading branch information
Rob Herring (Arm) authored and Will Deacon committed Mar 1, 2025
1 parent 7a53877 commit 7bf1001
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions drivers/perf/arm_v7_pmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -857,8 +857,6 @@ static void armv7pmu_enable_event(struct perf_event *event)
return;
}

armv7_pmnc_disable_counter(idx);

/*
* Set event (if destined for PMNx counters)
* We only need to set the event for the cycle counter if we
Expand Down Expand Up @@ -1450,8 +1448,6 @@ static void krait_pmu_enable_event(struct perf_event *event)
struct hw_perf_event *hwc = &event->hw;
int idx = hwc->idx;

armv7_pmnc_disable_counter(idx);

/*
* Set event (if destined for PMNx counters)
* We set the event for the cycle counter because we
Expand Down Expand Up @@ -1762,8 +1758,6 @@ static void scorpion_pmu_enable_event(struct perf_event *event)
struct hw_perf_event *hwc = &event->hw;
int idx = hwc->idx;

armv7_pmnc_disable_counter(idx);

/*
* Set event (if destined for PMNx counters)
* We don't set the event for the cycle counter because we
Expand Down

0 comments on commit 7bf1001

Please sign in to comment.