Skip to contentSkip to conversation

arm64: cpucaps: Remove stale comment about keeping capabilities sorted

PATCH Superseded Will Deacon 3 participants 4 messages Jul 23 arm64

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Will Deacon

author maintainer
#0 lore raw

PATCH 1/1 arm64: cpucaps: Remove stale comment about keeping capabilities sorted

From: Will Deacon <[email protected]>

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.

---

Follow-up from the discussion at:

https://lore.kernel.org/r/[email protected]

 arch/arm64/tools/cpucaps | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/tools/cpucaps +1 -1
index 9b85a84f6fd4..3fcac789b0a4 100644
@@ -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
Signature · 1 line
2.55.0.229.g6434b31f56-goog
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Will Deacon

From: Will Deacon <[email protected]>

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.

Quoted 4 lines

Cheers,
/fuad

Quoted 25 lines

---

Follow-up from the discussion at:

https://lore.kernel.org/r/[email protected]

 arch/arm64/tools/cpucaps | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/tools/cpucaps +1 -2
index 9b85a84f6fd4..3fcac789b0a4 100644
@@ -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

reviewer Acked-by on v1 1/1
#2 lore raw
In reply to Will Deacon
Quoted 7 lines · Will Deacon

From: Will Deacon <[email protected]>

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.

Quoted 4 lines

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

Mark.

Quoted 24 lines

---

Follow-up from the discussion at:

https://lore.kernel.org/r/[email protected]

 arch/arm64/tools/cpucaps | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/tools/cpucaps +1 -1
index 9b85a84f6fd4..3fcac789b0a4 100644
@@ -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
Signature · 1 line
2.55.0.229.g6434b31f56-goog
author maintainer
#3 lore raw
Quoted 9 lines · Mark Rutland
Quoted 7 lines · Will Deacon

From: Will Deacon <[email protected]>

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.

Quoted 4 lines

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.

Quoted 5 lines

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

Quoted 7 lines
     /*   
      * 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.

Quoted 9 lines
Quoted 5 lines

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

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