From: Rob Herring (Arm) Date: Wed, 26 Jun 2024 22:32:26 +0000 (-0600) Subject: perf: arm_pmuv3: Drop unnecessary IS_ENABLED(CONFIG_ARM64) check X-Git-Tag: v6.11-rc1~217^2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=598c1a2d9f4ba8a04cf92af8e988052179e31199;p=thirdparty%2Fkernel%2Flinux.git 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) Acked-by: Mark rutland Link: https://lore.kernel.org/r/20240626-arm-pmu-3-9-icntr-v2-2-c9784b4f4065@kernel.org Signed-off-by: Will Deacon --- diff --git a/drivers/perf/arm_pmuv3.c b/drivers/perf/arm_pmuv3.c index 02b2ac4cd297b..d6248493b5c6a 100644 --- a/drivers/perf/arm_pmuv3.c +++ b/drivers/perf/arm_pmuv3.c @@ -1045,7 +1045,7 @@ static int armv8pmu_set_event_filter(struct hw_perf_event *event, return -EINVAL; } - if (IS_ENABLED(CONFIG_ARM64) && th) { + if (th) { config_base |= FIELD_PREP(ARMV8_PMU_EVTYPE_TH, th); config_base |= FIELD_PREP(ARMV8_PMU_EVTYPE_TC, armv8pmu_event_threshold_control(attr));