Skip to content

Commit 264a593

Browse files
mrutland-armwilldeacon
authored andcommitted
arm64: cpufeature: Add HAFT to cpucap_is_possible()
For consistency with other cpucaps, handle the configuration check for ARM64_HAFT in cpucap_is_possible() rather than this being explicit in system_supports_haft(). The configuration check will now happen implicitly as cpus_have_final_cap() uses cpucap_is_possible() via alternative_has_cap_unlikely(). Cc: Catalin Marinas <[email protected]> Cc: Will Deacon <[email protected]> Signed-off-by: Mark Rutland <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent fac04ef commit 264a593

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
@@ -46,6 +46,8 @@ cpucap_is_possible(const unsigned int cap)
4646
return IS_ENABLED(CONFIG_ARM64_POE);
4747
case ARM64_HAS_GCS:
4848
return IS_ENABLED(CONFIG_ARM64_GCS);
49+
case ARM64_HAFT:
50+
return IS_ENABLED(CONFIG_ARM64_HAFT);
4951
case ARM64_UNMAP_KERNEL_AT_EL0:
5052
return IS_ENABLED(CONFIG_UNMAP_KERNEL_AT_EL0);
5153
case ARM64_WORKAROUND_843419:

arch/arm64/include/asm/cpufeature.h

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

853853
static inline bool system_supports_haft(void)
854854
{
855-
return IS_ENABLED(CONFIG_ARM64_HAFT) &&
856-
cpus_have_final_cap(ARM64_HAFT);
855+
return cpus_have_final_cap(ARM64_HAFT);
857856
}
858857

859858
static __always_inline bool system_supports_mpam(void)

0 commit comments

Comments
 (0)