From 95fab27fd0de95b8d98c7dbb8997468431f4a90f Mon Sep 17 00:00:00 2001 From: Andrew Cooper Date: Thu, 9 Feb 2017 18:22:50 +0000 Subject: [PATCH] x86/bitops: Force __scanbit() to be always inline 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 Acked-by: Jan Beulich --- xen/include/asm-x86/bitops.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/include/asm-x86/bitops.h b/xen/include/asm-x86/bitops.h index fd494e8ef1..0f18645cdc 100644 --- a/xen/include/asm-x86/bitops.h +++ b/xen/include/asm-x86/bitops.h @@ -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]", -- 2.30.2