[tip:master 31/36] arch/x86/include/asm/vdso/processor.h:11:29: error: redefinition of 'rep_nop'

From: kbuild test robot
Date: Mon Mar 23 2020 - 05:22:37 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git master
head: 0747bb04956d8614b67a01df63d65d28879a955a
commit: 7c8cd4b433697f9d2b9b268a0ca181c534a49c7b [31/36] Merge branch 'timers/core'
config: um-i386_defconfig (attached as .config)
compiler: gcc-7 (Debian 7.5.0-5) 7.5.0
reproduce:
git checkout 7c8cd4b433697f9d2b9b268a0ca181c534a49c7b
# save the attached .config to linux build tree
make ARCH=um SUBARCH=i386

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

In file included from include/vdso/processor.h:10:0,
from include/vdso/datapage.h:17,
from arch/x86/include/asm/vgtod.h:7,
from arch/x86/um/../kernel/sys_ia32.c:49:
>> arch/x86/include/asm/vdso/processor.h:11:29: error: redefinition of 'rep_nop'
static __always_inline void rep_nop(void)
^~~~~~~
In file included from include/linux/rcupdate.h:30:0,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from arch/x86/um/../kernel/sys_ia32.c:25:
arch/x86/um/asm/processor.h:24:20: note: previous definition of 'rep_nop' was here
static inline void rep_nop(void)
^~~~~~~
In file included from include/vdso/processor.h:10:0,
from include/vdso/datapage.h:17,
from arch/x86/include/asm/vgtod.h:7,
from arch/x86/um/../kernel/sys_ia32.c:49:
>> arch/x86/include/asm/vdso/processor.h:16:43: error: macro "cpu_relax" passed 1 arguments, but takes just 0
static __always_inline void cpu_relax(void)
^
>> arch/x86/include/asm/vdso/processor.h:17:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
{
^
In file included from arch/x86/include/asm/mshyperv.h:9:0,
from include/clocksource/hyperv_timer.h:18,
from arch/x86/include/asm/vdso/gettimeofday.h:21,
from include/vdso/datapage.h:126,
from arch/x86/include/asm/vgtod.h:7,
from arch/x86/um/../kernel/sys_ia32.c:49:
arch/x86/include/asm/nospec-branch.h: In function 'mds_clear_cpu_buffers':
>> arch/x86/include/asm/nospec-branch.h:324:24: error: '__KERNEL_DS' undeclared (first use in this function); did you mean 'KERNEL_DS'?
static const u16 ds = __KERNEL_DS;
^~~~~~~~~~~
KERNEL_DS
arch/x86/include/asm/nospec-branch.h:324:24: note: each undeclared identifier is reported only once for each function it appears in
In file included from include/linux/kernel.h:11:0,
from arch/x86/um/../kernel/sys_ia32.c:24:
arch/x86/include/asm/vdso/gettimeofday.h: In function '__arch_get_hw_counter':
>> arch/x86/include/asm/vdso/gettimeofday.h:246:27: error: 'VDSO_CLOCKMODE_TSC' undeclared (first use in this function); did you mean 'VDSO_CLOCKMODE_MAX'?
if (likely(clock_mode == VDSO_CLOCKMODE_TSC))
^
include/linux/compiler.h:77:40: note: in definition of macro 'likely'
# define likely(x) __builtin_expect(!!(x), 1)
^

vim +/rep_nop +11 arch/x86/include/asm/vdso/processor.h

abc22418db02b9 Vincenzo Frascino 2020-03-20 9
abc22418db02b9 Vincenzo Frascino 2020-03-20 10 /* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */
abc22418db02b9 Vincenzo Frascino 2020-03-20 @11 static __always_inline void rep_nop(void)
abc22418db02b9 Vincenzo Frascino 2020-03-20 12 {
abc22418db02b9 Vincenzo Frascino 2020-03-20 13 asm volatile("rep; nop" ::: "memory");
abc22418db02b9 Vincenzo Frascino 2020-03-20 14 }
abc22418db02b9 Vincenzo Frascino 2020-03-20 15
abc22418db02b9 Vincenzo Frascino 2020-03-20 @16 static __always_inline void cpu_relax(void)
abc22418db02b9 Vincenzo Frascino 2020-03-20 @17 {
abc22418db02b9 Vincenzo Frascino 2020-03-20 18 rep_nop();
abc22418db02b9 Vincenzo Frascino 2020-03-20 19 }
abc22418db02b9 Vincenzo Frascino 2020-03-20 20

:::::: The code at line 11 was first introduced by commit
:::::: abc22418db02b986fc5623c035507b6357e191ed x86/vdso: Enable x86 to use common headers

:::::: TO: Vincenzo Frascino <vincenzo.frascino@xxxxxxx>
:::::: CC: Thomas Gleixner <tglx@xxxxxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip