Skip to content

Commit 9c4a251

Browse files
jgoulyctmarinas
authored andcommitted
arm64: cpufeature: add POE to cpucap_is_possible()
Since de66cb3 ("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>
1 parent 8ef4178 commit 9c4a251

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

arch/arm64/include/asm/cpucaps.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ cpucap_is_possible(const unsigned int cap)
4242
return IS_ENABLED(CONFIG_ARM64_BTI);
4343
case ARM64_HAS_TLB_RANGE:
4444
return IS_ENABLED(CONFIG_ARM64_TLB_RANGE);
45+
case ARM64_HAS_S1POE:
46+
return IS_ENABLED(CONFIG_ARM64_POE);
4547
case ARM64_UNMAP_KERNEL_AT_EL0:
4648
return IS_ENABLED(CONFIG_UNMAP_KERNEL_AT_EL0);
4749
case ARM64_WORKAROUND_843419:

arch/arm64/include/asm/cpufeature.h

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

835835
static inline bool system_supports_poe(void)
836836
{
837-
return IS_ENABLED(CONFIG_ARM64_POE) &&
838-
alternative_has_cap_unlikely(ARM64_HAS_S1POE);
837+
return alternative_has_cap_unlikely(ARM64_HAS_S1POE);
839838
}
840839

841840
int do_emulate_mrs(struct pt_regs *regs, u32 sys_reg, u32 rt);

0 commit comments

Comments
 (0)