Skip to content

Commit 598c1a2

Browse files
robherringwilldeacon
authored andcommitted
perf: arm_pmuv3: Drop unnecessary IS_ENABLED(CONFIG_ARM64) check
The IS_ENABLED(CONFIG_ARM64) check for threshold support is unnecessary. The purpose is to not enable thresholds on arm32, but if threshold is non-zero, the check against threshold_max() just above here will have errored out because threshold_max() is always 0 on arm32. Signed-off-by: Rob Herring (Arm) <[email protected]> Acked-by: Mark rutland <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent 81e15ca commit 598c1a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/perf/arm_pmuv3.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1045,7 +1045,7 @@ static int armv8pmu_set_event_filter(struct hw_perf_event *event,
10451045
return -EINVAL;
10461046
}
10471047

1048-
if (IS_ENABLED(CONFIG_ARM64) && th) {
1048+
if (th) {
10491049
config_base |= FIELD_PREP(ARMV8_PMU_EVTYPE_TH, th);
10501050
config_base |= FIELD_PREP(ARMV8_PMU_EVTYPE_TC,
10511051
armv8pmu_event_threshold_control(attr));

0 commit comments

Comments
 (0)