linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* sh: arc: cmpxchg.h:50:12: error: implicit declaration of function 'cmpxchg_emu_u8' [-Werror=implicit-function-declaration]
@ 2024-04-15 10:47 Naresh Kamboju
  2024-04-17  2:19 ` Paul E. McKenney
  0 siblings, 1 reply; 2+ messages in thread
From: Naresh Kamboju @ 2024-04-15 10:47 UTC (permalink / raw)
  To: open list, lkft-triage, Linux Regressions
  Cc: Arnd Bergmann, Paul E. McKenney, Linux-sh list, linux-snps-arc,
	Vineet Gupta, Yoshinori Sato, Rich Felker

The arc and sh defconfig builds failed due to following build warnings / errors
on the Linux next-20240415 with gcc-9 and gcc-11.

Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>

Following builds failed.
sh:
arc:
 - defconfig
 - tinyconfig
 - allnoconfig
 - vdk_hs38_smp_defconfig

Build log:
--------
In file included from arch/arc/include/asm/atomic.h:13,
                 from include/linux/atomic.h:7,
                 from include/asm-generic/bitops/lock.h:5,
                 from arch/arc/include/asm/bitops.h:188,
                 from include/linux/bitops.h:70,
                 from include/linux/log2.h:12,
                 from kernel/bounds.c:13:
include/linux/atomic/atomic-arch-fallback.h: In function 'raw_atomic_cmpxchg':
arch/arc/include/asm/cmpxchg.h:50:12: error: implicit declaration of
function 'cmpxchg_emu_u8' [-Werror=implicit-function-declaration]
   50 |   _prev_ = cmpxchg_emu_u8((volatile u8 *)_p_, _o_, _n_); \
      |            ^~~~~~~~~~~~~~

Steps to reproduce:
---
# tuxmake --runtime podman --target-arch arc --toolchain gcc-9
--kconfig defconfig
# tuxmake --runtime podman --target-arch sh --toolchain gcc-11
--kconfig defconfig


Links:
---
 - https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20240415/testrun/23463978/suite/build/test/gcc-9-defconfig/details/
 - https://storage.tuxsuite.com/public/linaro/lkft/builds/2f7sIl2MlKB5Fgq7JtTpYQ9lnXw/
 - https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20240415/testrun/23463981/suite/build/test/gcc-11-defconfig/details/


--
Linaro LKFT
https://lkft.linaro.org

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

* Re: sh: arc: cmpxchg.h:50:12: error: implicit declaration of function 'cmpxchg_emu_u8' [-Werror=implicit-function-declaration]
  2024-04-15 10:47 sh: arc: cmpxchg.h:50:12: error: implicit declaration of function 'cmpxchg_emu_u8' [-Werror=implicit-function-declaration] Naresh Kamboju
@ 2024-04-17  2:19 ` Paul E. McKenney
  0 siblings, 0 replies; 2+ messages in thread
From: Paul E. McKenney @ 2024-04-17  2:19 UTC (permalink / raw)
  To: Naresh Kamboju
  Cc: open list, lkft-triage, Linux Regressions, Arnd Bergmann,
	Linux-sh list, linux-snps-arc, Vineet Gupta, Yoshinori Sato,
	Rich Felker

On Mon, Apr 15, 2024 at 04:17:01PM +0530, Naresh Kamboju wrote:
> The arc and sh defconfig builds failed due to following build warnings / errors
> on the Linux next-20240415 with gcc-9 and gcc-11.
> 
> Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
> 
> Following builds failed.
> sh:
> arc:
>  - defconfig
>  - tinyconfig
>  - allnoconfig
>  - vdk_hs38_smp_defconfig
> 
> Build log:
> --------
> In file included from arch/arc/include/asm/atomic.h:13,
>                  from include/linux/atomic.h:7,
>                  from include/asm-generic/bitops/lock.h:5,
>                  from arch/arc/include/asm/bitops.h:188,
>                  from include/linux/bitops.h:70,
>                  from include/linux/log2.h:12,
>                  from kernel/bounds.c:13:
> include/linux/atomic/atomic-arch-fallback.h: In function 'raw_atomic_cmpxchg':
> arch/arc/include/asm/cmpxchg.h:50:12: error: implicit declaration of
> function 'cmpxchg_emu_u8' [-Werror=implicit-function-declaration]
>    50 |   _prev_ = cmpxchg_emu_u8((volatile u8 *)_p_, _o_, _n_); \
>       |            ^~~~~~~~~~~~~~
> 
> Steps to reproduce:
> ---
> # tuxmake --runtime podman --target-arch arc --toolchain gcc-9
> --kconfig defconfig
> # tuxmake --runtime podman --target-arch sh --toolchain gcc-11
> --kconfig defconfig
> 
> 
> Links:
> ---
>  - https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20240415/testrun/23463978/suite/build/test/gcc-9-defconfig/details/
>  - https://storage.tuxsuite.com/public/linaro/lkft/builds/2f7sIl2MlKB5Fgq7JtTpYQ9lnXw/
>  - https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20240415/testrun/23463981/suite/build/test/gcc-11-defconfig/details/

Thank you for testing this!  Does the following diff (to be folded into
the originals with attribution) help?

							Thanx, Paul

------------------------------------------------------------------------

diff --git a/arch/arc/include/asm/cmpxchg.h b/arch/arc/include/asm/cmpxchg.h
index c3833e18389f4..40101f9d88d45 100644
--- a/arch/arc/include/asm/cmpxchg.h
+++ b/arch/arc/include/asm/cmpxchg.h
@@ -8,6 +8,7 @@
 
 #include <linux/build_bug.h>
 #include <linux/types.h>
+#include <linux/cmpxchg-emu.h>
 
 #include <asm/barrier.h>
 #include <asm/smp.h>
diff --git a/arch/sh/include/asm/cmpxchg.h b/arch/sh/include/asm/cmpxchg.h
index 27a9040983cfe..726b3ad9c8703 100644
--- a/arch/sh/include/asm/cmpxchg.h
+++ b/arch/sh/include/asm/cmpxchg.h
@@ -9,6 +9,7 @@
 
 #include <linux/compiler.h>
 #include <linux/types.h>
+#include <linux/cmpxchg-emu.h>
 
 #if defined(CONFIG_GUSA_RB)
 #include <asm/cmpxchg-grb.h>

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

end of thread, other threads:[~2024-04-17  2:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-15 10:47 sh: arc: cmpxchg.h:50:12: error: implicit declaration of function 'cmpxchg_emu_u8' [-Werror=implicit-function-declaration] Naresh Kamboju
2024-04-17  2:19 ` Paul E. McKenney

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).