public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Jason A. Donenfeld" <zx2c4@kernel.org>
Cc: kbuild-all@lists.01.org, Ammar Faizi <ammarfaizi2@gnuweeb.org>,
	GNU/Weeb Mailing List <gwml@vger.gnuweeb.org>,
	linux-kernel@vger.kernel.org
Subject: [ammarfaizi2-block:crng/random/jd/vdso 8/8] arch/x86/include/asm/vdso/gettimeofday.h:248:34: error: 'VDSO_CLOCKMODE_TSC' undeclared; did you mean 'VDSO_CLOCKMODE_MAX'?
Date: Sat, 30 Jul 2022 01:22:33 +0800	[thread overview]
Message-ID: <202207300138.IedUdmKn-lkp@intel.com> (raw)

tree:   https://github.com/ammarfaizi2/linux-block crng/random/jd/vdso
head:   02d56061c924adece19bdfad05ea4add32de4b63
commit: 02d56061c924adece19bdfad05ea4add32de4b63 [8/8] random: implement getrandom() in vDSO
config: um-x86_64_defconfig (https://download.01.org/0day-ci/archive/20220730/202207300138.IedUdmKn-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
reproduce (this is a W=1 build):
        # https://github.com/ammarfaizi2/linux-block/commit/02d56061c924adece19bdfad05ea4add32de4b63
        git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
        git fetch --no-tags ammarfaizi2-block crng/random/jd/vdso
        git checkout 02d56061c924adece19bdfad05ea4add32de4b63
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=um SUBARCH=x86_64 SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   In file included from include/vdso/processor.h:10,
                    from include/vdso/datapage.h:17,
                    from drivers/char/random.c:62:
>> arch/x86/include/asm/vdso/processor.h:11:29: error: redefinition of 'rep_nop'
      11 | static __always_inline void rep_nop(void)
         |                             ^~~~~~~
   In file included from include/linux/rcupdate.h:30,
                    from include/linux/rculist.h:11,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from include/linux/utsname.h:6,
                    from drivers/char/random.c:28:
   arch/x86/um/asm/processor.h:25:29: note: previous definition of 'rep_nop' with type 'void(void)'
      25 | static __always_inline void rep_nop(void)
         |                             ^~~~~~~
   In file included from include/vdso/processor.h:10,
                    from include/vdso/datapage.h:17,
                    from drivers/char/random.c:62:
>> arch/x86/include/asm/vdso/processor.h:16:29: error: redefinition of 'cpu_relax'
      16 | static __always_inline void cpu_relax(void)
         |                             ^~~~~~~~~
   In file included from include/linux/rcupdate.h:30,
                    from include/linux/rculist.h:11,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from include/linux/utsname.h:6,
                    from drivers/char/random.c:28:
   arch/x86/um/asm/processor.h:30:29: note: previous definition of 'cpu_relax' with type 'void(void)'
      30 | static __always_inline void cpu_relax(void)
         |                             ^~~~~~~~~
   In file included from arch/x86/include/asm/mshyperv.h:10,
                    from include/clocksource/hyperv_timer.h:18,
                    from arch/x86/include/asm/vdso/gettimeofday.h:21,
                    from include/vdso/datapage.h:143,
                    from drivers/char/random.c:62:
   arch/x86/include/asm/nospec-branch.h: In function 'mds_clear_cpu_buffers':
>> arch/x86/include/asm/nospec-branch.h:332:31: error: '__KERNEL_DS' undeclared (first use in this function)
     332 |         static const u16 ds = __KERNEL_DS;
         |                               ^~~~~~~~~~~
   arch/x86/include/asm/nospec-branch.h:332:31: note: each undeclared identifier is reported only once for each function it appears in
   In file included from include/asm-generic/bug.h:5,
                    from ./arch/um/include/generated/asm/bug.h:1,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:13,
                    from include/asm-generic/current.h:5,
                    from ./arch/um/include/generated/asm/current.h:1,
                    from include/linux/sched.h:12,
                    from include/linux/utsname.h:6,
                    from drivers/char/random.c:28:
   arch/x86/include/asm/vdso/gettimeofday.h: In function '__arch_get_hw_counter':
>> arch/x86/include/asm/vdso/gettimeofday.h:248:34: error: 'VDSO_CLOCKMODE_TSC' undeclared (first use in this function); did you mean 'VDSO_CLOCKMODE_MAX'?
     248 |         if (likely(clock_mode == VDSO_CLOCKMODE_TSC))
         |                                  ^~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:77:45: note: in definition of macro 'likely'
      77 | # define likely(x)      __builtin_expect(!!(x), 1)
         |                                             ^


vim +248 arch/x86/include/asm/vdso/gettimeofday.h

7ac8707479886c7 Vincenzo Frascino 2019-06-21  244  
4c5a116ada953b8 Thomas Gleixner   2020-08-04  245  static inline u64 __arch_get_hw_counter(s32 clock_mode,
4c5a116ada953b8 Thomas Gleixner   2020-08-04  246  					const struct vdso_data *vd)
7ac8707479886c7 Vincenzo Frascino 2019-06-21  247  {
b95a8a27c300d1a Thomas Gleixner   2020-02-07 @248  	if (likely(clock_mode == VDSO_CLOCKMODE_TSC))
7ac8707479886c7 Vincenzo Frascino 2019-06-21  249  		return (u64)rdtsc_ordered();
7ac8707479886c7 Vincenzo Frascino 2019-06-21  250  	/*
7ac8707479886c7 Vincenzo Frascino 2019-06-21  251  	 * For any memory-mapped vclock type, we need to make sure that gcc
7ac8707479886c7 Vincenzo Frascino 2019-06-21  252  	 * doesn't cleverly hoist a load before the mode check.  Otherwise we
7ac8707479886c7 Vincenzo Frascino 2019-06-21  253  	 * might end up touching the memory-mapped page even if the vclock in
7ac8707479886c7 Vincenzo Frascino 2019-06-21  254  	 * question isn't enabled, which will segfault.  Hence the barriers.
7ac8707479886c7 Vincenzo Frascino 2019-06-21  255  	 */
7ac8707479886c7 Vincenzo Frascino 2019-06-21  256  #ifdef CONFIG_PARAVIRT_CLOCK
b95a8a27c300d1a Thomas Gleixner   2020-02-07  257  	if (clock_mode == VDSO_CLOCKMODE_PVCLOCK) {
7ac8707479886c7 Vincenzo Frascino 2019-06-21  258  		barrier();
7ac8707479886c7 Vincenzo Frascino 2019-06-21  259  		return vread_pvclock();
7ac8707479886c7 Vincenzo Frascino 2019-06-21  260  	}
7ac8707479886c7 Vincenzo Frascino 2019-06-21  261  #endif
3e2d94535adb2df Vitaly Kuznetsov  2019-08-22  262  #ifdef CONFIG_HYPERV_TIMER
b95a8a27c300d1a Thomas Gleixner   2020-02-07  263  	if (clock_mode == VDSO_CLOCKMODE_HVCLOCK) {
7ac8707479886c7 Vincenzo Frascino 2019-06-21  264  		barrier();
7ac8707479886c7 Vincenzo Frascino 2019-06-21  265  		return vread_hvclock();
7ac8707479886c7 Vincenzo Frascino 2019-06-21  266  	}
7ac8707479886c7 Vincenzo Frascino 2019-06-21  267  #endif
7ac8707479886c7 Vincenzo Frascino 2019-06-21  268  	return U64_MAX;
7ac8707479886c7 Vincenzo Frascino 2019-06-21  269  }
7ac8707479886c7 Vincenzo Frascino 2019-06-21  270  

:::::: The code at line 248 was first introduced by commit
:::::: b95a8a27c300d1a39a4e36f63a518ef36e4b966c x86/vdso: Use generic VDSO clock mode storage

:::::: TO: Thomas Gleixner <tglx@linutronix.de>
:::::: CC: Thomas Gleixner <tglx@linutronix.de>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

                 reply	other threads:[~2022-07-29 17:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202207300138.IedUdmKn-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=ammarfaizi2@gnuweeb.org \
    --cc=gwml@vger.gnuweeb.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zx2c4@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox