Re: [PATCH] kconfig: always use user input symbols

From: kbuild test robot
Date: Mon May 22 2017 - 02:53:59 EST


Hi Tycho,

[auto build test ERROR on linus/master]
[also build test ERROR on v4.12-rc2 next-20170522]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Tycho-Andersen/kconfig-always-use-user-input-symbols/20170522-143552
config: i386-tinyconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=i386

All error/warnings (new ones prefixed by >>):

In file included from arch/x86/include/asm/bitops.h:16:0,
from include/linux/bitops.h:36,
from include/linux/kernel.h:10,
from include/asm-generic/bug.h:15,
from arch/x86/include/asm/bug.h:81,
from include/linux/bug.h:4,
from include/linux/page-flags.h:9,
from kernel/bounds.c:9:
arch/x86/include/asm/arch_hweight.h: In function '__arch_hweight64':
>> arch/x86/include/asm/arch_hweight.h:54:42: error: expected ':' or ')' before 'POPCNT64'
asm (ALTERNATIVE("call __sw_hweight64", POPCNT64, X86_FEATURE_POPCNT)
^
arch/x86/include/asm/alternative.h:132:28: note: in definition of macro 'ALTINSTR_REPLACEMENT'
b_replacement(num)":\n\t" newinstr "\n" e_replacement(num) ":\n\t"
^~~~~~~~
>> arch/x86/include/asm/arch_hweight.h:54:7: note: in expansion of macro 'ALTERNATIVE'
asm (ALTERNATIVE("call __sw_hweight64", POPCNT64, X86_FEATURE_POPCNT)
^~~~~~~~~~~
make[2]: *** [kernel/bounds.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [sub-make] Error 2

vim +54 arch/x86/include/asm/arch_hweight.h

d61931d8 Borislav Petkov 2010-03-05 38 static inline unsigned int __arch_hweight8(unsigned int w)
d61931d8 Borislav Petkov 2010-03-05 39 {
d61931d8 Borislav Petkov 2010-03-05 40 return __arch_hweight32(w & 0xff);
d61931d8 Borislav Petkov 2010-03-05 41 }
d61931d8 Borislav Petkov 2010-03-05 42
d14edb16 Denys Vlasenko 2015-08-04 43 #ifdef CONFIG_X86_32
d61931d8 Borislav Petkov 2010-03-05 44 static inline unsigned long __arch_hweight64(__u64 w)
d61931d8 Borislav Petkov 2010-03-05 45 {
d61931d8 Borislav Petkov 2010-03-05 46 return __arch_hweight32((u32)w) +
d61931d8 Borislav Petkov 2010-03-05 47 __arch_hweight32((u32)(w >> 32));
d14edb16 Denys Vlasenko 2015-08-04 48 }
d61931d8 Borislav Petkov 2010-03-05 49 #else
d14edb16 Denys Vlasenko 2015-08-04 50 static __always_inline unsigned long __arch_hweight64(__u64 w)
d14edb16 Denys Vlasenko 2015-08-04 51 {
f5967101 Borislav Petkov 2016-05-30 52 unsigned long res;
d14edb16 Denys Vlasenko 2015-08-04 53
c59bd568 H. Peter Anvin 2010-05-17 @54 asm (ALTERNATIVE("call __sw_hweight64", POPCNT64, X86_FEATURE_POPCNT)
d61931d8 Borislav Petkov 2010-03-05 55 : "="REG_OUT (res)
d61931d8 Borislav Petkov 2010-03-05 56 : REG_IN (w));
d61931d8 Borislav Petkov 2010-03-05 57
d61931d8 Borislav Petkov 2010-03-05 58 return res;
d61931d8 Borislav Petkov 2010-03-05 59 }
d14edb16 Denys Vlasenko 2015-08-04 60 #endif /* CONFIG_X86_32 */
d61931d8 Borislav Petkov 2010-03-05 61
d61931d8 Borislav Petkov 2010-03-05 62 #endif

:::::: The code at line 54 was first introduced by commit
:::::: c59bd5688299cddb71183e156e7a3c1409b90df2 x86, hweight: Use a 32-bit popcnt for __arch_hweight32()

:::::: TO: H. Peter Anvin <hpa@xxxxxxxxxxxxxxx>
:::::: CC: H. Peter Anvin <hpa@xxxxxxxxxxxxxxx>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: application/gzip