Skip to content

Commit f00b53f

Browse files
rmurphy-armctmarinas
authored andcommitted
arm64: cpufeature: Add GCS to cpucap_is_possible()
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 <[email protected]> Acked-by: Mark Rutland <[email protected]> Reviewed-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/416c7369fcdce4ebb2a8f12daae234507be27e38.1733406275.git.robin.murphy@arm.com Signed-off-by: Catalin Marinas <[email protected]>
1 parent 16d5306 commit f00b53f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

arch/arm64/include/asm/cpucaps.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ cpucap_is_possible(const unsigned int cap)
4444
return IS_ENABLED(CONFIG_ARM64_TLB_RANGE);
4545
case ARM64_HAS_S1POE:
4646
return IS_ENABLED(CONFIG_ARM64_POE);
47+
case ARM64_HAS_GCS:
48+
return IS_ENABLED(CONFIG_ARM64_GCS);
4749
case ARM64_UNMAP_KERNEL_AT_EL0:
4850
return IS_ENABLED(CONFIG_UNMAP_KERNEL_AT_EL0);
4951
case ARM64_WORKAROUND_843419:

arch/arm64/include/asm/cpufeature.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -847,8 +847,7 @@ static inline bool system_supports_poe(void)
847847

848848
static inline bool system_supports_gcs(void)
849849
{
850-
return IS_ENABLED(CONFIG_ARM64_GCS) &&
851-
alternative_has_cap_unlikely(ARM64_HAS_GCS);
850+
return alternative_has_cap_unlikely(ARM64_HAS_GCS);
852851
}
853852

854853
static inline bool system_supports_haft(void)

0 commit comments

Comments
 (0)