]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
arm64: cpufeature: add POE to cpucap_is_possible()
authorJoey Gouly <joey.gouly@arm.com>
Tue, 8 Oct 2024 14:01:21 +0000 (15:01 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Wed, 16 Oct 2024 14:30:53 +0000 (15:30 +0100)
Since de66cb37ab6 ("arm64: Add cpucap_is_possible()"),
alternative_has_cap_unlikely() includes the IS_ENABLED() check.

Add CONFIG_ARM64_POE to cpucap_is_possible() to avoid the explicit check.

Signed-off-by: Joey Gouly <joey.gouly@arm.com>
Cc: Will Deacon <will@kernel.org>
Acked-by: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20241008140121.2774348-1-joey.gouly@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/cpucaps.h
arch/arm64/include/asm/cpufeature.h

index a6e5b07b64fd55dd9d822e90a19ab5c6cb716998..a08a1212ffbb80bd851d3cb4f2f90f52e0e57002 100644 (file)
@@ -42,6 +42,8 @@ cpucap_is_possible(const unsigned int cap)
                return IS_ENABLED(CONFIG_ARM64_BTI);
        case ARM64_HAS_TLB_RANGE:
                return IS_ENABLED(CONFIG_ARM64_TLB_RANGE);
+       case ARM64_HAS_S1POE:
+               return IS_ENABLED(CONFIG_ARM64_POE);
        case ARM64_UNMAP_KERNEL_AT_EL0:
                return IS_ENABLED(CONFIG_UNMAP_KERNEL_AT_EL0);
        case ARM64_WORKAROUND_843419:
index 3d261cc123c1e22ac7bc9cfcde463624c76b2084..4b6bc0bac9b9337a1979e9cbe282732b0c5ffd3f 100644 (file)
@@ -834,8 +834,7 @@ static inline bool system_supports_lpa2(void)
 
 static inline bool system_supports_poe(void)
 {
-       return IS_ENABLED(CONFIG_ARM64_POE) &&
-               alternative_has_cap_unlikely(ARM64_HAS_S1POE);
+       return alternative_has_cap_unlikely(ARM64_HAS_S1POE);
 }
 
 int do_emulate_mrs(struct pt_regs *regs, u32 sys_reg, u32 rt);