HomeFreeBSD

Fix clang 11 inline asm constraint error when building powerpc GENERIC64

Description

Fix clang 11 inline asm constraint error when building powerpc GENERIC64
kernels:

sys/powerpc/aim/mmu_radix.c:728:19: error: invalid operand for inline asm constraint 'i'

__asm __volatile(PPC_TLBIEL(%0, %1, %2, %3, 1)
                 ^

sys/powerpc/aim/mmu_radix.c:149:3: note: expanded from macro 'PPC_TLBIEL'

__XSTRING(.long PPC_INST_TLBIEL | \
^

sys/sys/cdefs.h:161:22: note: expanded from macro 'XSTRING'
#define
XSTRING(x) __STRING(x) /* expand x, then stringify */

^

sys/sys/cdefs.h:160:21: note: expanded from macro 'STRING'
#define
STRING(x) #x /* stringify without expanding x */

^

<scratch space>:112:1: note: expanded from here
".long 0x7c000224 | (((%0) & 0x1f) << 11) | (((%1) & 0x1f) << 21) | (((%2) & 0x3) << 18) | (((%3) & 0x1) << 17) | (((1) & 0x1) << 16)"
^

This is solved by making the affected inline functions __always_inline.

Suggested by: jhibbits
MFC after: 3 days

Details

Provenance
dimAuthored on Aug 7 2020, 7:32 PM
Parents
rG69bc4fa916a9: script: Put the terminal in raw mode when playing back a session.
Branches
Unknown
Tags
Unknown

Event Timeline