x86/bitops: Force __scanbit() to be always inline
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 9 Feb 2017 18:22:50 +0000 (18:22 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 13 Feb 2017 11:29:46 +0000 (11:29 +0000)
It turns out that GCCs 4.9.2 and 6.3.0 instantiate __scanbit() in three
translation units, but never references the result.  All real uses of
__scanbit() are already suitably inline.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/include/asm-x86/bitops.h

index fd494e8ef192ce9b03c2726c50274a667b03e9ae..0f18645cdc50d63e2fa68a0f6a784f39f643c3da 100644 (file)
@@ -334,7 +334,7 @@ extern unsigned int __find_first_zero_bit(
 extern unsigned int __find_next_zero_bit(
     const unsigned long *addr, unsigned int size, unsigned int offset);
 
-static inline unsigned int __scanbit(unsigned long val, unsigned int max)
+static always_inline unsigned int __scanbit(unsigned long val, unsigned int max)
 {
     if ( __builtin_constant_p(max) && max == BITS_PER_LONG )
         alternative_io("bsf %[in],%[out]; cmovz %[max],%k[out]",