Skip to content

Commit 4b0567a

Browse files
mrutland-armwilldeacon
authored andcommitted
perf: arm_pmuv3: Don't disable counter in armv8pmu_enable_event()
Currently armv8pmu_enable_event() starts 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 armv8pmu_enable_event() is called. Remove the redundant call to armv8pmu_disable_event_counter(). At the same time, remove the comment immeditately above as everything it says is obvious from the function names below. Signed-off-by: Mark Rutland <[email protected]> Signed-off-by: Rob Herring (Arm) <[email protected]> Reviewed-by: Anshuman Khandual <[email protected]> Tested-by: James Clark <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent dcca27b commit 4b0567a

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

drivers/perf/arm_pmuv3.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -795,11 +795,6 @@ static void armv8pmu_enable_user_access(struct arm_pmu *cpu_pmu)
795795

796796
static void armv8pmu_enable_event(struct perf_event *event)
797797
{
798-
/*
799-
* Enable counter and interrupt, and set the counter to count
800-
* the event that we're interested in.
801-
*/
802-
armv8pmu_disable_event_counter(event);
803798
armv8pmu_write_event_type(event);
804799
armv8pmu_enable_event_irq(event);
805800
armv8pmu_enable_event_counter(event);

0 commit comments

Comments
 (0)