All of lore.kernel.org
 help / color / mirror / Atom feed
* [paulmck-rcu:dev.2024.03.27b 64/69] arch/xtensa/include/asm/cmpxchg.h:77:25: error: implicit declaration of function 'cmpxchg_emu_u8'
@ 2024-03-29 15:08 kernel test robot
  2024-03-29 18:48 ` Paul E. McKenney
  0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2024-03-29 15:08 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: oe-kbuild-all, linux-kernel

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git dev.2024.03.27b
head:   786fab3085d764055a78edb54023420920344333
commit: b3b1a154281fc97efc4c1d5818a83c29c228dbd5 [64/69] xtensa: Emulate one-byte and two-byte cmpxchg
config: xtensa-allnoconfig (https://download.01.org/0day-ci/archive/20240329/202403292321.T55etywH-lkp@intel.com/config)
compiler: xtensa-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240329/202403292321.T55etywH-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202403292321.T55etywH-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from arch/xtensa/include/asm/atomic.h:19,
                    from include/linux/atomic.h:7,
                    from include/asm-generic/bitops/atomic.h:5,
                    from arch/xtensa/include/asm/bitops.h:192,
                    from include/linux/bitops.h:68,
                    from include/linux/log2.h:12,
                    from kernel/bounds.c:13:
   arch/xtensa/include/asm/cmpxchg.h: In function '__cmpxchg':
>> arch/xtensa/include/asm/cmpxchg.h:77:25: error: implicit declaration of function 'cmpxchg_emu_u8' [-Werror=implicit-function-declaration]
      77 |         case 1:  return cmpxchg_emu_u8((volatile u8 *)ptr, old, new);
         |                         ^~~~~~~~~~~~~~
>> arch/xtensa/include/asm/cmpxchg.h:78:25: error: implicit declaration of function 'cmpxchg_emu_u16' [-Werror=implicit-function-declaration]
      78 |         case 2:  return cmpxchg_emu_u16((volatile u16 *)ptr, old, new);
         |                         ^~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors
   make[3]: *** [scripts/Makefile.build:117: kernel/bounds.s] Error 1
   make[3]: Target 'prepare' not remade because of errors.
   make[2]: *** [Makefile:1197: prepare0] Error 2
   make[2]: Target 'prepare' not remade because of errors.
   make[1]: *** [Makefile:240: __sub-make] Error 2
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [Makefile:240: __sub-make] Error 2
   make: Target 'prepare' not remade because of errors.


vim +/cmpxchg_emu_u8 +77 arch/xtensa/include/asm/cmpxchg.h

    72	
    73	static __inline__ unsigned long
    74	__cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size)
    75	{
    76		switch (size) {
  > 77		case 1:  return cmpxchg_emu_u8((volatile u8 *)ptr, old, new);
  > 78		case 2:  return cmpxchg_emu_u16((volatile u16 *)ptr, old, new);
    79		case 4:  return __cmpxchg_u32(ptr, old, new);
    80		default: __cmpxchg_called_with_bad_pointer();
    81			 return old;
    82		}
    83	}
    84	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

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

* Re: [paulmck-rcu:dev.2024.03.27b 64/69] arch/xtensa/include/asm/cmpxchg.h:77:25: error: implicit declaration of function 'cmpxchg_emu_u8'
  2024-03-29 15:08 [paulmck-rcu:dev.2024.03.27b 64/69] arch/xtensa/include/asm/cmpxchg.h:77:25: error: implicit declaration of function 'cmpxchg_emu_u8' kernel test robot
@ 2024-03-29 18:48 ` Paul E. McKenney
  2024-03-31 15:53   ` Yujie Liu
  0 siblings, 1 reply; 3+ messages in thread
From: Paul E. McKenney @ 2024-03-29 18:48 UTC (permalink / raw)
  To: kernel test robot; +Cc: oe-kbuild-all, linux-kernel

On Fri, Mar 29, 2024 at 11:08:04PM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git dev.2024.03.27b
> head:   786fab3085d764055a78edb54023420920344333
> commit: b3b1a154281fc97efc4c1d5818a83c29c228dbd5 [64/69] xtensa: Emulate one-byte and two-byte cmpxchg
> config: xtensa-allnoconfig (https://download.01.org/0day-ci/archive/20240329/202403292321.T55etywH-lkp@intel.com/config)
> compiler: xtensa-linux-gcc (GCC) 13.2.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240329/202403292321.T55etywH-lkp@intel.com/reproduce)
> 
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202403292321.T55etywH-lkp@intel.com/
> 
> All errors (new ones prefixed by >>):
> 
>    In file included from arch/xtensa/include/asm/atomic.h:19,
>                     from include/linux/atomic.h:7,
>                     from include/asm-generic/bitops/atomic.h:5,
>                     from arch/xtensa/include/asm/bitops.h:192,
>                     from include/linux/bitops.h:68,
>                     from include/linux/log2.h:12,
>                     from kernel/bounds.c:13:
>    arch/xtensa/include/asm/cmpxchg.h: In function '__cmpxchg':
> >> arch/xtensa/include/asm/cmpxchg.h:77:25: error: implicit declaration of function 'cmpxchg_emu_u8' [-Werror=implicit-function-declaration]
>       77 |         case 1:  return cmpxchg_emu_u8((volatile u8 *)ptr, old, new);
>          |                         ^~~~~~~~~~~~~~

Good catch!  Does the diff at the end fix this?

							Thanx, Paul

> >> arch/xtensa/include/asm/cmpxchg.h:78:25: error: implicit declaration of function 'cmpxchg_emu_u16' [-Werror=implicit-function-declaration]
>       78 |         case 2:  return cmpxchg_emu_u16((volatile u16 *)ptr, old, new);
>          |                         ^~~~~~~~~~~~~~~
>    cc1: some warnings being treated as errors
>    make[3]: *** [scripts/Makefile.build:117: kernel/bounds.s] Error 1
>    make[3]: Target 'prepare' not remade because of errors.
>    make[2]: *** [Makefile:1197: prepare0] Error 2
>    make[2]: Target 'prepare' not remade because of errors.
>    make[1]: *** [Makefile:240: __sub-make] Error 2
>    make[1]: Target 'prepare' not remade because of errors.
>    make: *** [Makefile:240: __sub-make] Error 2
>    make: Target 'prepare' not remade because of errors.
> 
> 
> vim +/cmpxchg_emu_u8 +77 arch/xtensa/include/asm/cmpxchg.h
> 
>     72	
>     73	static __inline__ unsigned long
>     74	__cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size)
>     75	{
>     76		switch (size) {
>   > 77		case 1:  return cmpxchg_emu_u8((volatile u8 *)ptr, old, new);
>   > 78		case 2:  return cmpxchg_emu_u16((volatile u16 *)ptr, old, new);
>     79		case 4:  return __cmpxchg_u32(ptr, old, new);
>     80		default: __cmpxchg_called_with_bad_pointer();
>     81			 return old;
>     82		}
>     83	}
>     84	
> 
> -- 
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki

commit 663161aaa5c3286dcfc9ba2cd9e12170f9354ea7
Author: Paul E. McKenney <paulmck@kernel.org>
Date:   Fri Mar 29 11:47:13 2024 -0700

    squash! xtensa: Emulate one-byte and two-byte cmpxchg
    
    [ paulmck: Apply kernel test robot feedback. ]
    
    Signed-off-by: Paul E. McKenney <paulmck@kernel.org>

diff --git a/arch/xtensa/include/asm/cmpxchg.h b/arch/xtensa/include/asm/cmpxchg.h
index bcce915a98e21..a0f9a2070209b 100644
--- a/arch/xtensa/include/asm/cmpxchg.h
+++ b/arch/xtensa/include/asm/cmpxchg.h
@@ -15,6 +15,7 @@
 
 #include <linux/bits.h>
 #include <linux/stringify.h>
+#include <linux/cmpxchg-emu.h>
 
 /*
  * cmpxchg

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

* Re: [paulmck-rcu:dev.2024.03.27b 64/69] arch/xtensa/include/asm/cmpxchg.h:77:25: error: implicit declaration of function 'cmpxchg_emu_u8'
  2024-03-29 18:48 ` Paul E. McKenney
@ 2024-03-31 15:53   ` Yujie Liu
  0 siblings, 0 replies; 3+ messages in thread
From: Yujie Liu @ 2024-03-31 15:53 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: kernel test robot, oe-kbuild-all, linux-kernel

On Fri, Mar 29, 2024 at 11:48:37AM -0700, Paul E. McKenney wrote:
> On Fri, Mar 29, 2024 at 11:08:04PM +0800, kernel test robot wrote:
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git dev.2024.03.27b
> > head:   786fab3085d764055a78edb54023420920344333
> > commit: b3b1a154281fc97efc4c1d5818a83c29c228dbd5 [64/69] xtensa: Emulate one-byte and two-byte cmpxchg
> > config: xtensa-allnoconfig (https://download.01.org/0day-ci/archive/20240329/202403292321.T55etywH-lkp@intel.com/config)
> > compiler: xtensa-linux-gcc (GCC) 13.2.0
> > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240329/202403292321.T55etywH-lkp@intel.com/reproduce)
> > 
> > If you fix the issue in a separate patch/commit (i.e. not just a new version of
> > the same patch/commit), kindly add following tags
> > | Reported-by: kernel test robot <lkp@intel.com>
> > | Closes: https://lore.kernel.org/oe-kbuild-all/202403292321.T55etywH-lkp@intel.com/
> > 
> > All errors (new ones prefixed by >>):
> > 
> >    In file included from arch/xtensa/include/asm/atomic.h:19,
> >                     from include/linux/atomic.h:7,
> >                     from include/asm-generic/bitops/atomic.h:5,
> >                     from arch/xtensa/include/asm/bitops.h:192,
> >                     from include/linux/bitops.h:68,
> >                     from include/linux/log2.h:12,
> >                     from kernel/bounds.c:13:
> >    arch/xtensa/include/asm/cmpxchg.h: In function '__cmpxchg':
> > >> arch/xtensa/include/asm/cmpxchg.h:77:25: error: implicit declaration of function 'cmpxchg_emu_u8' [-Werror=implicit-function-declaration]
> >       77 |         case 1:  return cmpxchg_emu_u8((volatile u8 *)ptr, old, new);
> >          |                         ^~~~~~~~~~~~~~
> 
> Good catch!  Does the diff at the end fix this?

The error is fixed by the diff at the end.

Tested-by: Yujie Liu <yujie.liu@intel.com>

> 
> 							Thanx, Paul
> 
> > >> arch/xtensa/include/asm/cmpxchg.h:78:25: error: implicit declaration of function 'cmpxchg_emu_u16' [-Werror=implicit-function-declaration]
> >       78 |         case 2:  return cmpxchg_emu_u16((volatile u16 *)ptr, old, new);
> >          |                         ^~~~~~~~~~~~~~~
> >    cc1: some warnings being treated as errors
> >    make[3]: *** [scripts/Makefile.build:117: kernel/bounds.s] Error 1
> >    make[3]: Target 'prepare' not remade because of errors.
> >    make[2]: *** [Makefile:1197: prepare0] Error 2
> >    make[2]: Target 'prepare' not remade because of errors.
> >    make[1]: *** [Makefile:240: __sub-make] Error 2
> >    make[1]: Target 'prepare' not remade because of errors.
> >    make: *** [Makefile:240: __sub-make] Error 2
> >    make: Target 'prepare' not remade because of errors.
> > 
> > 
> > vim +/cmpxchg_emu_u8 +77 arch/xtensa/include/asm/cmpxchg.h
> > 
> >     72	
> >     73	static __inline__ unsigned long
> >     74	__cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size)
> >     75	{
> >     76		switch (size) {
> >   > 77		case 1:  return cmpxchg_emu_u8((volatile u8 *)ptr, old, new);
> >   > 78		case 2:  return cmpxchg_emu_u16((volatile u16 *)ptr, old, new);
> >     79		case 4:  return __cmpxchg_u32(ptr, old, new);
> >     80		default: __cmpxchg_called_with_bad_pointer();
> >     81			 return old;
> >     82		}
> >     83	}
> >     84	
> > 
> > -- 
> > 0-DAY CI Kernel Test Service
> > https://github.com/intel/lkp-tests/wiki
> 
> commit 663161aaa5c3286dcfc9ba2cd9e12170f9354ea7
> Author: Paul E. McKenney <paulmck@kernel.org>
> Date:   Fri Mar 29 11:47:13 2024 -0700
> 
>     squash! xtensa: Emulate one-byte and two-byte cmpxchg
>     
>     [ paulmck: Apply kernel test robot feedback. ]
>     
>     Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
> 
> diff --git a/arch/xtensa/include/asm/cmpxchg.h b/arch/xtensa/include/asm/cmpxchg.h
> index bcce915a98e21..a0f9a2070209b 100644
> --- a/arch/xtensa/include/asm/cmpxchg.h
> +++ b/arch/xtensa/include/asm/cmpxchg.h
> @@ -15,6 +15,7 @@
>  
>  #include <linux/bits.h>
>  #include <linux/stringify.h>
> +#include <linux/cmpxchg-emu.h>
>  
>  /*
>   * cmpxchg
> 

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

end of thread, other threads:[~2024-03-31 15:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-29 15:08 [paulmck-rcu:dev.2024.03.27b 64/69] arch/xtensa/include/asm/cmpxchg.h:77:25: error: implicit declaration of function 'cmpxchg_emu_u8' kernel test robot
2024-03-29 18:48 ` Paul E. McKenney
2024-03-31 15:53   ` Yujie Liu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.