Author: dim
Date: Fri Aug  7 19:32:54 2020
New Revision: 364040
URL: https://svnweb.freebsd.org/changeset/base/364040

Log:
  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

Modified:
  head/sys/powerpc/aim/mmu_radix.c

Modified: head/sys/powerpc/aim/mmu_radix.c
==============================================================================
--- head/sys/powerpc/aim/mmu_radix.c    Fri Aug  7 18:48:56 2020        
(r364039)
+++ head/sys/powerpc/aim/mmu_radix.c    Fri Aug  7 19:32:54 2020        
(r364040)
@@ -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)
 {
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to