diff options
author | Michael Ellerman <mpe@ellerman.id.au> | 2024-05-09 15:12:46 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2024-07-11 10:31:44 +0300 |
commit | 489116d784bebec7e441f400715fbfe6edbce66c (patch) | |
tree | 68e45f0b66418d8ccd501694b38a11e580b78c10 /arch | |
parent | fde318326daa48a4bb3ca8ee229bac4d14b5bc2a (diff) | |
download | linux-489116d784bebec7e441f400715fbfe6edbce66c.tar.xz |
powerpc: Drop clang workaround for builtin constant checks
The CPU/MMU feature code has build-time checks that the feature value is
a builtin constant.
Back when the code was added clang wasn't able to compile the
checks, so an ifdef was added to avoid the checks for clang builds.
See commit b5fa0f7f88ed ("powerpc: Fix build failure with clang due
to BUILD_BUG_ON()")
These days clang 13 and later are able to build the checks successfully,
so drop the workaround.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20240509121248.270878-1-mpe@ellerman.id.au
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/include/asm/cpu_has_feature.h | 2 | ||||
-rw-r--r-- | arch/powerpc/include/asm/mmu.h | 2 |
2 files changed, 0 insertions, 4 deletions
diff --git a/arch/powerpc/include/asm/cpu_has_feature.h b/arch/powerpc/include/asm/cpu_has_feature.h index 0efabccd820c..92e24e979954 100644 --- a/arch/powerpc/include/asm/cpu_has_feature.h +++ b/arch/powerpc/include/asm/cpu_has_feature.h @@ -24,9 +24,7 @@ static __always_inline bool cpu_has_feature(unsigned long feature) { int i; -#ifndef __clang__ /* clang can't cope with this */ BUILD_BUG_ON(!__builtin_constant_p(feature)); -#endif #ifdef CONFIG_JUMP_LABEL_FEATURE_CHECK_DEBUG if (!static_key_feature_checks_initialized) { diff --git a/arch/powerpc/include/asm/mmu.h b/arch/powerpc/include/asm/mmu.h index 009c45044a5a..1d1395b769a8 100644 --- a/arch/powerpc/include/asm/mmu.h +++ b/arch/powerpc/include/asm/mmu.h @@ -239,9 +239,7 @@ static __always_inline bool mmu_has_feature(unsigned long feature) { int i; -#ifndef __clang__ /* clang can't cope with this */ BUILD_BUG_ON(!__builtin_constant_p(feature)); -#endif #ifdef CONFIG_JUMP_LABEL_FEATURE_CHECK_DEBUG if (!static_key_feature_checks_initialized) { |