Skip to content

Commit

Permalink
perf: arm_v7_pmu: Drop obvious comments for enabling/disabling counte…
Browse files Browse the repository at this point in the history
…rs and interrupts

The function calls for enabling/disabling counters and interrupts are
pretty obvious as to what they are doing, and the comments don't add
any additional value.

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-4-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 4b0567a commit 7a53877
Showing 1 changed file with 0 additions and 44 deletions.
44 changes: 0 additions & 44 deletions drivers/perf/arm_v7_pmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -857,14 +857,6 @@ static void armv7pmu_enable_event(struct perf_event *event)
return;
}

/*
* Enable counter and interrupt, and set the counter to count
* the event that we're interested in.
*/

/*
* Disable counter
*/
armv7_pmnc_disable_counter(idx);

/*
Expand All @@ -875,14 +867,7 @@ static void armv7pmu_enable_event(struct perf_event *event)
if (cpu_pmu->set_event_filter || idx != ARMV7_IDX_CYCLE_COUNTER)
armv7_pmnc_write_evtsel(idx, hwc->config_base);

/*
* Enable interrupt for this counter
*/
armv7_pmnc_enable_intens(idx);

/*
* Enable counter
*/
armv7_pmnc_enable_counter(idx);
}

Expand All @@ -898,18 +883,7 @@ static void armv7pmu_disable_event(struct perf_event *event)
return;
}

/*
* Disable counter and interrupt
*/

/*
* Disable counter
*/
armv7_pmnc_disable_counter(idx);

/*
* Disable interrupt for this counter
*/
armv7_pmnc_disable_intens(idx);
}

Expand Down Expand Up @@ -1476,12 +1450,6 @@ static void krait_pmu_enable_event(struct perf_event *event)
struct hw_perf_event *hwc = &event->hw;
int idx = hwc->idx;

/*
* Enable counter and interrupt, and set the counter to count
* the event that we're interested in.
*/

/* Disable counter */
armv7_pmnc_disable_counter(idx);

/*
Expand All @@ -1494,10 +1462,7 @@ static void krait_pmu_enable_event(struct perf_event *event)
else
armv7_pmnc_write_evtsel(idx, hwc->config_base);

/* Enable interrupt for this counter */
armv7_pmnc_enable_intens(idx);

/* Enable counter */
armv7_pmnc_enable_counter(idx);
}

Expand Down Expand Up @@ -1797,12 +1762,6 @@ static void scorpion_pmu_enable_event(struct perf_event *event)
struct hw_perf_event *hwc = &event->hw;
int idx = hwc->idx;

/*
* Enable counter and interrupt, and set the counter to count
* the event that we're interested in.
*/

/* Disable counter */
armv7_pmnc_disable_counter(idx);

/*
Expand All @@ -1815,10 +1774,7 @@ static void scorpion_pmu_enable_event(struct perf_event *event)
else if (idx != ARMV7_IDX_CYCLE_COUNTER)
armv7_pmnc_write_evtsel(idx, hwc->config_base);

/* Enable interrupt for this counter */
armv7_pmnc_enable_intens(idx);

/* Enable counter */
armv7_pmnc_enable_counter(idx);
}

Expand Down

0 comments on commit 7a53877

Please sign in to comment.