linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* next: arch/riscv/kvm/aia_imsic.c:237:9: error: call to undeclared function  'arch_atomic_long_fetch_or'
@ 2023-06-19  9:57 Naresh Kamboju
  2023-06-19 13:00 ` Mark Rutland
  0 siblings, 1 reply; 3+ messages in thread
From: Naresh Kamboju @ 2023-06-19  9:57 UTC (permalink / raw)
  To: Linux-Next Mailing List, open list, clang-built-linux, lkft-triage
  Cc: Anup Patel, Atish Patra, Anup Patel, Arnd Bergmann, Anders Roxell

Following build regressions noticed on Linux next-20230619.

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

Regressions found on riscv:

 - build/rv32-clang-16-lkftconfig
 - build/rv32-clang-16-tinyconfig
 - build/rv32-clang-nightly-defconfig
 - build/rv32-clang-16-allnoconfig
 - build/gcc-12-defconfig
 - build/gcc-11-lkftconfig
 - build/clang-16-lkftconfig
 - build/rv32-clang-16-defconfig
 - build/gcc-8-defconfig
 - build/rv32-gcc-11-lkftconfig
 - build/clang-16-defconfig
 - build/rv32-clang-nightly-allnoconfig
 - build/rv32-clang-nightly-tinyconfig
 - build/clang-nightly-defconfig


arch/riscv/kvm/aia_imsic.c:237:9: error: call to undeclared function
 'arch_atomic_long_fetch_or'; ISO C99 and later do not support implicit
    function declarations [-Wimplicit-function-declaration]
        return arch_atomic_long_fetch_or(val, (atomic_long_t *)ptr);
               ^
arch/riscv/kvm/aia_imsic.c:237:9: note: did you mean 'raw_atomic_long_fetch_or'?
include/linux/atomic/atomic-long.h:1087:1: note:
'raw_atomic_long_fetch_or' declared here
raw_atomic_long_fetch_or(long i, atomic_long_t *v)
^
1 error generated.

Links:
 - https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230619/testrun/17634187/suite/build/test/clang-16-defconfig/log
 - https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230619/testrun/17634187/suite/build/test/clang-16-defconfig/history/
 - https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230619/testrun/17634187/suite/build/test/clang-16-defconfig/details/

Steps to reproduce:
# To install tuxmake to your home directory at ~/.local/bin:
# pip3 install -U --user tuxmake
#
# Or install a deb/rpm depending on the running distribution
# See https://tuxmake.org/install-deb/ or
# https://tuxmake.org/install-rpm/
#
# See https://docs.tuxmake.org/ for complete documentation.

tuxmake --runtime podman --target-arch riscv --toolchain clang-16
--kconfig defconfig LLVM=1 LLVM_IAS=1

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

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

* Re: next: arch/riscv/kvm/aia_imsic.c:237:9: error: call to undeclared function  'arch_atomic_long_fetch_or'
  2023-06-19  9:57 next: arch/riscv/kvm/aia_imsic.c:237:9: error: call to undeclared function 'arch_atomic_long_fetch_or' Naresh Kamboju
@ 2023-06-19 13:00 ` Mark Rutland
  2023-06-19 16:44   ` Anup Patel
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Rutland @ 2023-06-19 13:00 UTC (permalink / raw)
  To: Naresh Kamboju, Anup Patel
  Cc: Linux-Next Mailing List, open list, clang-built-linux,
	lkft-triage, Anup Patel, Atish Patra, Arnd Bergmann,
	Anders Roxell

On Mon, Jun 19, 2023 at 03:27:47PM +0530, Naresh Kamboju wrote:
> Following build regressions noticed on Linux next-20230619.
> 
> Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
> 
> Regressions found on riscv:
> 
>  - build/rv32-clang-16-lkftconfig
>  - build/rv32-clang-16-tinyconfig
>  - build/rv32-clang-nightly-defconfig
>  - build/rv32-clang-16-allnoconfig
>  - build/gcc-12-defconfig
>  - build/gcc-11-lkftconfig
>  - build/clang-16-lkftconfig
>  - build/rv32-clang-16-defconfig
>  - build/gcc-8-defconfig
>  - build/rv32-gcc-11-lkftconfig
>  - build/clang-16-defconfig
>  - build/rv32-clang-nightly-allnoconfig
>  - build/rv32-clang-nightly-tinyconfig
>  - build/clang-nightly-defconfig
> 
> 
> arch/riscv/kvm/aia_imsic.c:237:9: error: call to undeclared function
>  'arch_atomic_long_fetch_or'; ISO C99 and later do not support implicit
>     function declarations [-Wimplicit-function-declaration]
>         return arch_atomic_long_fetch_or(val, (atomic_long_t *)ptr);
>                ^
> arch/riscv/kvm/aia_imsic.c:237:9: note: did you mean 'raw_atomic_long_fetch_or'?
> include/linux/atomic/atomic-long.h:1087:1: note:
> 'raw_atomic_long_fetch_or' declared here
> raw_atomic_long_fetch_or(long i, atomic_long_t *v)
> ^
> 1 error generated.

It looks like this is because:

  2f68d5420412040e ("RISC-V: KVM: Add in-kernel virtualization of AIA IMSIC")

... added a call to arch_atomic_long_fetch_or(), but we've reworked the atomics
in the tip locking/core branch such that arch_atomic_long_fetch_or() doesn't
exist unless provided directly by the architecture.

Does this actually need to be arch_atomic_long_fetch_or(), i.e. was there a
specific reason not to use atomic_long_fetch_or() here?

If not, then please use atomic_long_fetch_or() -- that'll work before and after
the locking/core changes.

Otherwise we'll need to figure out how to handle the transient breakage.

Thanks,
Mark.

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

* Re: next: arch/riscv/kvm/aia_imsic.c:237:9: error: call to undeclared function 'arch_atomic_long_fetch_or'
  2023-06-19 13:00 ` Mark Rutland
@ 2023-06-19 16:44   ` Anup Patel
  0 siblings, 0 replies; 3+ messages in thread
From: Anup Patel @ 2023-06-19 16:44 UTC (permalink / raw)
  To: Mark Rutland
  Cc: Naresh Kamboju, Linux-Next Mailing List, open list,
	clang-built-linux, lkft-triage, Anup Patel, Atish Patra,
	Arnd Bergmann, Anders Roxell

On Mon, Jun 19, 2023 at 6:30 PM Mark Rutland <mark.rutland@arm.com> wrote:
>
> On Mon, Jun 19, 2023 at 03:27:47PM +0530, Naresh Kamboju wrote:
> > Following build regressions noticed on Linux next-20230619.
> >
> > Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
> >
> > Regressions found on riscv:
> >
> >  - build/rv32-clang-16-lkftconfig
> >  - build/rv32-clang-16-tinyconfig
> >  - build/rv32-clang-nightly-defconfig
> >  - build/rv32-clang-16-allnoconfig
> >  - build/gcc-12-defconfig
> >  - build/gcc-11-lkftconfig
> >  - build/clang-16-lkftconfig
> >  - build/rv32-clang-16-defconfig
> >  - build/gcc-8-defconfig
> >  - build/rv32-gcc-11-lkftconfig
> >  - build/clang-16-defconfig
> >  - build/rv32-clang-nightly-allnoconfig
> >  - build/rv32-clang-nightly-tinyconfig
> >  - build/clang-nightly-defconfig
> >
> >
> > arch/riscv/kvm/aia_imsic.c:237:9: error: call to undeclared function
> >  'arch_atomic_long_fetch_or'; ISO C99 and later do not support implicit
> >     function declarations [-Wimplicit-function-declaration]
> >         return arch_atomic_long_fetch_or(val, (atomic_long_t *)ptr);
> >                ^
> > arch/riscv/kvm/aia_imsic.c:237:9: note: did you mean 'raw_atomic_long_fetch_or'?
> > include/linux/atomic/atomic-long.h:1087:1: note:
> > 'raw_atomic_long_fetch_or' declared here
> > raw_atomic_long_fetch_or(long i, atomic_long_t *v)
> > ^
> > 1 error generated.
>
> It looks like this is because:
>
>   2f68d5420412040e ("RISC-V: KVM: Add in-kernel virtualization of AIA IMSIC")
>
> ... added a call to arch_atomic_long_fetch_or(), but we've reworked the atomics
> in the tip locking/core branch such that arch_atomic_long_fetch_or() doesn't
> exist unless provided directly by the architecture.
>
> Does this actually need to be arch_atomic_long_fetch_or(), i.e. was there a
> specific reason not to use atomic_long_fetch_or() here?
>
> If not, then please use atomic_long_fetch_or() -- that'll work before and after
> the locking/core changes.

There is no specific reason for using arch_atomic_long_fetch_or().
I will update the patch to use atomic_long_fetch_or().

Thanks for catching.

Regards,
Anup

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

end of thread, other threads:[~2023-06-19 16:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-19  9:57 next: arch/riscv/kvm/aia_imsic.c:237:9: error: call to undeclared function 'arch_atomic_long_fetch_or' Naresh Kamboju
2023-06-19 13:00 ` Mark Rutland
2023-06-19 16:44   ` Anup Patel

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