All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64: cpucaps: Remove stale comment about keeping capabilities sorted
@ 2026-07-23 13:02 Will Deacon
  2026-07-23 13:04 ` Fuad Tabba
  2026-07-23 13:13 ` Mark Rutland
  0 siblings, 2 replies; 4+ messages in thread
From: Will Deacon @ 2026-07-23 13:02 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Will Deacon, Catalin Marinas, Mark Rutland, Marc Zyngier,
	Will Deacon

From: Will Deacon <willdeacon@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.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Reported-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Will Deacon <will@kernel.org>
---

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



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] arm64: cpucaps: Remove stale comment about keeping capabilities sorted
  2026-07-23 13:02 [PATCH] arm64: cpucaps: Remove stale comment about keeping capabilities sorted Will Deacon
@ 2026-07-23 13:04 ` Fuad Tabba
  2026-07-23 13:13 ` Mark Rutland
  1 sibling, 0 replies; 4+ messages in thread
From: Fuad Tabba @ 2026-07-23 13:04 UTC (permalink / raw)
  To: Will Deacon
  Cc: linux-arm-kernel, Will Deacon, Catalin Marinas, Mark Rutland,
	Marc Zyngier

On Thu, 23 Jul 2026 at 14:02, Will Deacon <will@kernel.org> wrote:
>
> From: Will Deacon <willdeacon@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.
>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Reported-by: Marc Zyngier <maz@kernel.org>
> Signed-off-by: Will Deacon <will@kernel.org>

Reviewed-by: Fuad Tabba <fuad.tabba@linux.dev>

Cheers,
/fuad

> ---
>
> 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
>
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] arm64: cpucaps: Remove stale comment about keeping capabilities sorted
  2026-07-23 13:02 [PATCH] arm64: cpucaps: Remove stale comment about keeping capabilities sorted Will Deacon
  2026-07-23 13:04 ` Fuad Tabba
@ 2026-07-23 13:13 ` Mark Rutland
  2026-07-23 15:19   ` Will Deacon
  1 sibling, 1 reply; 4+ messages in thread
From: Mark Rutland @ 2026-07-23 13:13 UTC (permalink / raw)
  To: Will Deacon; +Cc: linux-arm-kernel, Will Deacon, Catalin Marinas, Marc Zyngier

On Thu, Jul 23, 2026 at 02:02:32PM +0100, Will Deacon wrote:
> From: Will Deacon <willdeacon@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@arm.com>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Reported-by: Marc Zyngier <maz@kernel.org>
> Signed-off-by: Will Deacon <will@kernel.org>

Regardless of whether you add the above to the commit message:

Acked-by: Mark Rutland <mark.rutland@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
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] arm64: cpucaps: Remove stale comment about keeping capabilities sorted
  2026-07-23 13:13 ` Mark Rutland
@ 2026-07-23 15:19   ` Will Deacon
  0 siblings, 0 replies; 4+ messages in thread
From: Will Deacon @ 2026-07-23 15:19 UTC (permalink / raw)
  To: Mark Rutland; +Cc: linux-arm-kernel, Will Deacon, Catalin Marinas, Marc Zyngier

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@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@arm.com>
> > Cc: Mark Rutland <mark.rutland@arm.com>
> > Reported-by: Marc Zyngier <maz@kernel.org>
> > Signed-off-by: Will Deacon <will@kernel.org>
> 
> Regardless of whether you add the above to the commit message:
> 
> Acked-by: Mark Rutland <mark.rutland@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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-07-23 15:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-23 13:02 [PATCH] arm64: cpucaps: Remove stale comment about keeping capabilities sorted Will Deacon
2026-07-23 13:04 ` Fuad Tabba
2026-07-23 13:13 ` Mark Rutland
2026-07-23 15:19   ` Will Deacon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.