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
This commit is contained in:
Dimitry Andric 2020-08-07 19:32:54 +00:00
parent 69bc4fa916
commit 21673cf0bd
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=364040

View File

@ -183,7 +183,7 @@ ttusync(void)
* Invalidate a range of translations
*/
static __inline void
static __always_inline void
radix_tlbie(uint8_t ric, uint8_t prs, uint16_t is, uint32_t pid, uint32_t lpid,
vm_offset_t va, uint16_t ap)
{
@ -715,7 +715,7 @@ static struct md_page pv_dummy;
static int powernv_enabled = 1;
static inline void
static __always_inline void
tlbiel_radix_set_isa300(uint32_t set, uint32_t is,
uint32_t pid, uint32_t ric, uint32_t prs)
{