[PATCH] arm64: cpucaps: Remove stale comment about keeping capabilities sorted
Mark Rutland
mark.rutland at arm.com
Thu Jul 23 06:13:20 PDT 2026
On Thu, Jul 23, 2026 at 02:02:32PM +0100, Will Deacon wrote:
> From: Will Deacon <willdeacon at google.com>
>
> There is no functional requirement to keep the entries in arm64's
> tools/cpucaps file sorted alphabetically and, in fact, they have fallen
> out of order over time. Given that only the arm64 tree touches this file,
> just remove the stale comment and accept that we're collectively not
> very good at the alphabet.
It might be worth mentioning:
(1) The intent of sorting was to make it easier to avoid and/or resolve
merge conflicts, which hasn't been a big problem in practice.
(2) In the few cases where we do depend on the order of specific
cpucaps, we've added build-time asserts, e.g. in
can_use_gic_priorities(), which has:
/*
* ARM64_HAS_GICV3_CPUIF has a lower index, and is a boot CPU
* feature, so will be detected earlier.
*/
BUILD_BUG_ON(ARM64_HAS_GIC_PRIO_MASKING <= ARM64_HAS_GICV3_CPUIF);
... and we can still do that.
> Cc: Catalin Marinas <catalin.marinas at arm.com>
> Cc: Mark Rutland <mark.rutland at arm.com>
> Reported-by: Marc Zyngier <maz at kernel.org>
> Signed-off-by: Will Deacon <will at kernel.org>
Regardless of whether you add the above to the commit message:
Acked-by: Mark Rutland <mark.rutland at arm.com>
Mark.
> ---
>
> Follow-up from the discussion at:
>
> https://lore.kernel.org/r/20260519092243.7278-1-will@kernel.org
>
> arch/arm64/tools/cpucaps | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/tools/cpucaps b/arch/arm64/tools/cpucaps
> index 9b85a84f6fd4..3fcac789b0a4 100644
> --- a/arch/arm64/tools/cpucaps
> +++ b/arch/arm64/tools/cpucaps
> @@ -1,6 +1,6 @@
> # SPDX-License-Identifier: GPL-2.0
> #
> -# Internal CPU capabilities constants, keep this list sorted
> +# Internal CPU capabilities constants
>
> ALWAYS_BOOT
> ALWAYS_SYSTEM
> --
> 2.55.0.229.g6434b31f56-goog
>
More information about the linux-arm-kernel
mailing list