Skip to content

Commit 489116d

Browse files
committed
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 b5fa0f7 ("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 <[email protected]> Link: https://msgid.link/[email protected]
1 parent fde3183 commit 489116d

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

arch/powerpc/include/asm/cpu_has_feature.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ static __always_inline bool cpu_has_feature(unsigned long feature)
2424
{
2525
int i;
2626

27-
#ifndef __clang__ /* clang can't cope with this */
2827
BUILD_BUG_ON(!__builtin_constant_p(feature));
29-
#endif
3028

3129
#ifdef CONFIG_JUMP_LABEL_FEATURE_CHECK_DEBUG
3230
if (!static_key_feature_checks_initialized) {

arch/powerpc/include/asm/mmu.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,7 @@ static __always_inline bool mmu_has_feature(unsigned long feature)
239239
{
240240
int i;
241241

242-
#ifndef __clang__ /* clang can't cope with this */
243242
BUILD_BUG_ON(!__builtin_constant_p(feature));
244-
#endif
245243

246244
#ifdef CONFIG_JUMP_LABEL_FEATURE_CHECK_DEBUG
247245
if (!static_key_feature_checks_initialized) {

0 commit comments

Comments
 (0)