[PATCH] arm64: cpucaps: Remove stale comment about keeping capabilities sorted
Will Deacon
will at kernel.org
Thu Jul 23 08:19:41 PDT 2026
On Thu, Jul 23, 2026 at 02:13:20PM +0100, Mark Rutland wrote:
> 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.
I was trying to get at that when I mentioned that "only the arm64 tree
touches this file", but I'll add some extra wording.
>
> (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.
I'll mention this too.
>
> > 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>
Thanks. I'll post a v2 with the author fixed up as well... either my
hard drive or my TPM died this week, so it's been great fun setting up
a new machine whilst in the middle of merging stuff.
Will
More information about the linux-arm-kernel
mailing list