linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* arch/riscv/include/asm/vdso/processor.h:14:2: error: implicit declaration of function 'barrier'
@ 2020-11-21 18:39 kernel test robot
  2020-11-23 18:43 ` Nick Desaulniers
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2020-11-21 18:39 UTC (permalink / raw)
  To: Arvind Sankar
  Cc: kbuild-all, linux-kernel, Randy Dunlap, Andrew Morton,
	Linux Memory Management List, Nick Desaulniers, Kees Cook

[-- Attachment #1: Type: text/plain, Size: 2851 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   27bba9c532a8d21050b94224ffd310ad0058c353
commit: 3347acc6fcd4ee71ad18a9ff9d9dac176b517329 compiler.h: fix barrier_data() on clang
date:   7 days ago
config: riscv-randconfig-r003-20201121 (attached as .config)
compiler: riscv32-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3347acc6fcd4ee71ad18a9ff9d9dac176b517329
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 3347acc6fcd4ee71ad18a9ff9d9dac176b517329
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=riscv 

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

All errors (new ones prefixed by >>):

   In file included from include/vdso/processor.h:10,
                    from arch/riscv/include/asm/processor.h:11,
                    from include/linux/prefetch.h:15,
                    from drivers/net/ethernet/intel/ixgb/ixgb_main.c:6:
   arch/riscv/include/asm/vdso/processor.h: In function 'cpu_relax':
>> arch/riscv/include/asm/vdso/processor.h:14:2: error: implicit declaration of function 'barrier' [-Werror=implicit-function-declaration]
      14 |  barrier();
         |  ^~~~~~~
   cc1: some warnings being treated as errors

vim +/barrier +14 arch/riscv/include/asm/vdso/processor.h

ad5d1122b82fbd6 Vincent Chen 2020-06-09   6  
ad5d1122b82fbd6 Vincent Chen 2020-06-09   7  static inline void cpu_relax(void)
ad5d1122b82fbd6 Vincent Chen 2020-06-09   8  {
ad5d1122b82fbd6 Vincent Chen 2020-06-09   9  #ifdef __riscv_muldiv
ad5d1122b82fbd6 Vincent Chen 2020-06-09  10  	int dummy;
ad5d1122b82fbd6 Vincent Chen 2020-06-09  11  	/* In lieu of a halt instruction, induce a long-latency stall. */
ad5d1122b82fbd6 Vincent Chen 2020-06-09  12  	__asm__ __volatile__ ("div %0, %0, zero" : "=r" (dummy));
ad5d1122b82fbd6 Vincent Chen 2020-06-09  13  #endif
ad5d1122b82fbd6 Vincent Chen 2020-06-09 @14  	barrier();
ad5d1122b82fbd6 Vincent Chen 2020-06-09  15  }
ad5d1122b82fbd6 Vincent Chen 2020-06-09  16  

:::::: The code at line 14 was first introduced by commit
:::::: ad5d1122b82fbd6a816d1b9d26ee01a6dbc2d757 riscv: use vDSO common flow to reduce the latency of the time-related functions

:::::: TO: Vincent Chen <vincent.chen@sifive.com>
:::::: CC: Palmer Dabbelt <palmerdabbelt@google.com>

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 40124 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: arch/riscv/include/asm/vdso/processor.h:14:2: error: implicit declaration of function 'barrier'
  2020-11-21 18:39 arch/riscv/include/asm/vdso/processor.h:14:2: error: implicit declaration of function 'barrier' kernel test robot
@ 2020-11-23 18:43 ` Nick Desaulniers
  0 siblings, 0 replies; 2+ messages in thread
From: Nick Desaulniers @ 2020-11-23 18:43 UTC (permalink / raw)
  To: kernel test robot
  Cc: Arvind Sankar, kbuild-all, LKML, Randy Dunlap, Andrew Morton,
	Linux Memory Management List, Kees Cook

Randy's fix got picked up:
https://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git/commit/?h=fixes&id=f52c08ea5fc8e2057a5913b1f6bfd534e1fb7e4c

We're going to need to ensure that this gets backported to stable along with
commit: 3347acc6fcd4ee71ad18a9ff9d9dac176b517329 compiler.h: fix
barrier_data() on clang

On Sat, Nov 21, 2020 at 10:39 AM kernel test robot <lkp@intel.com> wrote:
>
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   27bba9c532a8d21050b94224ffd310ad0058c353
> commit: 3347acc6fcd4ee71ad18a9ff9d9dac176b517329 compiler.h: fix barrier_data() on clang
> date:   7 days ago
> config: riscv-randconfig-r003-20201121 (attached as .config)
> compiler: riscv32-linux-gcc (GCC) 9.3.0
> reproduce (this is a W=1 build):
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3347acc6fcd4ee71ad18a9ff9d9dac176b517329
>         git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>         git fetch --no-tags linus master
>         git checkout 3347acc6fcd4ee71ad18a9ff9d9dac176b517329
>         # save the attached .config to linux build tree
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=riscv
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
>    In file included from include/vdso/processor.h:10,
>                     from arch/riscv/include/asm/processor.h:11,
>                     from include/linux/prefetch.h:15,
>                     from drivers/net/ethernet/intel/ixgb/ixgb_main.c:6:
>    arch/riscv/include/asm/vdso/processor.h: In function 'cpu_relax':
> >> arch/riscv/include/asm/vdso/processor.h:14:2: error: implicit declaration of function 'barrier' [-Werror=implicit-function-declaration]
>       14 |  barrier();
>          |  ^~~~~~~
>    cc1: some warnings being treated as errors
>
> vim +/barrier +14 arch/riscv/include/asm/vdso/processor.h
>
> ad5d1122b82fbd6 Vincent Chen 2020-06-09   6
> ad5d1122b82fbd6 Vincent Chen 2020-06-09   7  static inline void cpu_relax(void)
> ad5d1122b82fbd6 Vincent Chen 2020-06-09   8  {
> ad5d1122b82fbd6 Vincent Chen 2020-06-09   9  #ifdef __riscv_muldiv
> ad5d1122b82fbd6 Vincent Chen 2020-06-09  10     int dummy;
> ad5d1122b82fbd6 Vincent Chen 2020-06-09  11     /* In lieu of a halt instruction, induce a long-latency stall. */
> ad5d1122b82fbd6 Vincent Chen 2020-06-09  12     __asm__ __volatile__ ("div %0, %0, zero" : "=r" (dummy));
> ad5d1122b82fbd6 Vincent Chen 2020-06-09  13  #endif
> ad5d1122b82fbd6 Vincent Chen 2020-06-09 @14     barrier();
> ad5d1122b82fbd6 Vincent Chen 2020-06-09  15  }
> ad5d1122b82fbd6 Vincent Chen 2020-06-09  16
>
> :::::: The code at line 14 was first introduced by commit
> :::::: ad5d1122b82fbd6a816d1b9d26ee01a6dbc2d757 riscv: use vDSO common flow to reduce the latency of the time-related functions
>
> :::::: TO: Vincent Chen <vincent.chen@sifive.com>
> :::::: CC: Palmer Dabbelt <palmerdabbelt@google.com>
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org



-- 
Thanks,
~Nick Desaulniers

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-23 18:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-21 18:39 arch/riscv/include/asm/vdso/processor.h:14:2: error: implicit declaration of function 'barrier' kernel test robot
2020-11-23 18:43 ` Nick Desaulniers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).