]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
arm64: cpufeature: Add GCS to cpucap_is_possible()
authorRobin Murphy <robin.murphy@arm.com>
Thu, 5 Dec 2024 13:48:10 +0000 (13:48 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Thu, 5 Dec 2024 17:15:38 +0000 (17:15 +0000)
Since system_supports_gcs() ends up referring to cpucap_is_possible(),
teach the latter about GCS for consistency with similar features.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/416c7369fcdce4ebb2a8f12daae234507be27e38.1733406275.git.robin.murphy@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/cpucaps.h
arch/arm64/include/asm/cpufeature.h

index 201a46efd9188e51daa833578ea241faf866d720..cbbf70e0f204856683da207f38e9472afe6c26bc 100644 (file)
@@ -44,6 +44,8 @@ cpucap_is_possible(const unsigned int cap)
                return IS_ENABLED(CONFIG_ARM64_TLB_RANGE);
        case ARM64_HAS_S1POE:
                return IS_ENABLED(CONFIG_ARM64_POE);
+       case ARM64_HAS_GCS:
+               return IS_ENABLED(CONFIG_ARM64_GCS);
        case ARM64_UNMAP_KERNEL_AT_EL0:
                return IS_ENABLED(CONFIG_UNMAP_KERNEL_AT_EL0);
        case ARM64_WORKAROUND_843419:
index b64e49bd9d106109e3319e596aec5917b65b0783..8b4e5a3cd24c801e13a1339b7b748c513b12c6f4 100644 (file)
@@ -847,8 +847,7 @@ static inline bool system_supports_poe(void)
 
 static inline bool system_supports_gcs(void)
 {
-       return IS_ENABLED(CONFIG_ARM64_GCS) &&
-               alternative_has_cap_unlikely(ARM64_HAS_GCS);
+       return alternative_has_cap_unlikely(ARM64_HAS_GCS);
 }
 
 static inline bool system_supports_haft(void)