linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* next: mips: cavium_octeon_defconfig: gcc-8 - dwc3-octeon.c:502:8: include/linux/compiler_types.h:397:38: error: call to '__compiletime_assert_335' declared with attribute error: FIELD_PREP: value too large for the field _compiletime_assert
@ 2023-08-08  7:11 Naresh Kamboju
  2023-08-08  7:45 ` Ladislav Michl
  0 siblings, 1 reply; 4+ messages in thread
From: Naresh Kamboju @ 2023-08-08  7:11 UTC (permalink / raw)
  To: Linux-Next Mailing List, linux-usb, linux-mips, lkft-triage
  Cc: Ladislav Michl, Thinh.Nguyen, Greg Kroah-Hartman, Arnd Bergmann,
	Anders Roxell, Thomas Bogendoerfer

[My two cents]

While building Linux next-20230808 mips cavium_octeon_defconfig with gcc-8
failed with below warnings and errors.

Build log:
----------

In function 'dwc3_octeon_setup.isra.4',
    inlined from 'dwc3_octeon_probe' at drivers/usb/dwc3/dwc3-octeon.c:502:8:
include/linux/compiler_types.h:397:38: error: call to
'__compiletime_assert_335' declared with attribute error: FIELD_PREP:
value too large for the field
  _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
                                      ^
include/linux/compiler_types.h:378:4: note: in definition of macro
'__compiletime_assert'
    prefix ## suffix();    \
    ^~~~~~

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

Links:
-----
 - https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230808/testrun/18882876/suite/build/test/gcc-8-cavium_octeon_defconfig/log
 - https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230808/testrun/18882876/suite/build/test/gcc-8-cavium_octeon_defconfig/history/

Steps to reproduce:
------------
  tuxmake --runtime podman --target-arch mips --toolchain gcc-8
--kconfig cavium_octeon_defconfig
   - https://storage.tuxsuite.com/public/linaro/lkft/builds/2TgoAZwerJ28UWHyqfQUiaYYhrl/tuxmake_reproducer.sh

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

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

* Re: next: mips: cavium_octeon_defconfig: gcc-8 - dwc3-octeon.c:502:8: include/linux/compiler_types.h:397:38: error: call to '__compiletime_assert_335' declared with attribute error: FIELD_PREP: value too large for the field _compiletime_assert
  2023-08-08  7:11 next: mips: cavium_octeon_defconfig: gcc-8 - dwc3-octeon.c:502:8: include/linux/compiler_types.h:397:38: error: call to '__compiletime_assert_335' declared with attribute error: FIELD_PREP: value too large for the field _compiletime_assert Naresh Kamboju
@ 2023-08-08  7:45 ` Ladislav Michl
  2023-08-08  9:10   ` Ladislav Michl
  2023-08-09  6:29   ` Naresh Kamboju
  0 siblings, 2 replies; 4+ messages in thread
From: Ladislav Michl @ 2023-08-08  7:45 UTC (permalink / raw)
  To: Naresh Kamboju, Linux-Next Mailing List, linux-usb, linux-mips,
	lkft-triage
  Cc: Thinh.Nguyen, Greg Kroah-Hartman, Arnd Bergmann, Anders Roxell,
	Thomas Bogendoerfer

Hi Naresh,

On Tue, 2023-08-08 at 12:41 +0530, Naresh Kamboju wrote:
> [My two cents]
> 
> While building Linux next-20230808 mips cavium_octeon_defconfig with
> gcc-8
> failed with below warnings and errors.
> 
> Build log:
> ----------
> 
> In function 'dwc3_octeon_setup.isra.4',
>     inlined from 'dwc3_octeon_probe' at drivers/usb/dwc3/dwc3-
> octeon.c:502:8:
> include/linux/compiler_types.h:397:38: error: call to
> '__compiletime_assert_335' declared with attribute error: FIELD_PREP:
> value too large for the field
>   _compiletime_assert(condition, msg, __compiletime_assert_,
> __COUNTER__)
>                                       ^
> include/linux/compiler_types.h:378:4: note: in definition of macro
> '__compiletime_assert'
>     prefix ## suffix();    \
>     ^~~~~~

Not sure what is really going on there. Code compiles even using 32bit
toochains without warnings and such an assignments are used in other
kernel drivers. See for example drivers/cxl/core/hdm.c:534 which is
using the same types. Also 
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c in
rvu_exact_prepare_table_entry...

Anyway, let me setup gcc-8 toolchain :)

>   Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
> 
> Links:
> -----
>  -
> https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230808/testrun/18882876/suite/build/test/gcc-8-cavium_octeon_defconfig/log
>  -
> https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230808/testrun/18882876/suite/build/test/gcc-8-cavium_octeon_defconfig/history/
> 
> Steps to reproduce:
> ------------
>   tuxmake --runtime podman --target-arch mips --toolchain gcc-8
> --kconfig cavium_octeon_defconfig
>    -
> https://storage.tuxsuite.com/public/linaro/lkft/builds/2TgoAZwerJ28UWHyqfQUiaYYhrl/tuxmake_reproducer.sh
> 
> --
> Linaro LKFT
> https://lkft.linaro.org


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

* Re: next: mips: cavium_octeon_defconfig: gcc-8 - dwc3-octeon.c:502:8: include/linux/compiler_types.h:397:38: error: call to '__compiletime_assert_335' declared with attribute error: FIELD_PREP: value too large for the field _compiletime_assert
  2023-08-08  7:45 ` Ladislav Michl
@ 2023-08-08  9:10   ` Ladislav Michl
  2023-08-09  6:29   ` Naresh Kamboju
  1 sibling, 0 replies; 4+ messages in thread
From: Ladislav Michl @ 2023-08-08  9:10 UTC (permalink / raw)
  To: Naresh Kamboju, Linux-Next Mailing List, linux-usb, linux-mips,
	lkft-triage
  Cc: Thinh.Nguyen, Greg Kroah-Hartman, Arnd Bergmann, Anders Roxell,
	Thomas Bogendoerfer

On Tue, 2023-08-08 at 09:45 +0200, Ladislav Michl wrote:
> Hi Naresh,
> 
> On Tue, 2023-08-08 at 12:41 +0530, Naresh Kamboju wrote:
> > [My two cents]

seems this is going to be far more expensive ;-)

> > While building Linux next-20230808 mips cavium_octeon_defconfig
> > with gcc-8 failed with below warnings and errors.
> > 
> > Build log:
> > ----------
> > 
> > In function 'dwc3_octeon_setup.isra.4',
> >     inlined from 'dwc3_octeon_probe' at drivers/usb/dwc3/dwc3-
> > octeon.c:502:8:
> > include/linux/compiler_types.h:397:38: error: call to
> > '__compiletime_assert_335' declared with attribute error:
> > FIELD_PREP:
> > value too large for the field
> >   _compiletime_assert(condition, msg, __compiletime_assert_,
> > __COUNTER__)
> >                                       ^
> > include/linux/compiler_types.h:378:4: note: in definition of macro
> > '__compiletime_assert'
> >     prefix ## suffix();    \
> >     ^~~~~~
> 
> Not sure what is really going on there. Code compiles even using
> 32bit toochains without warnings and such an assignments are used in
> other kernel drivers. See for example drivers/cxl/core/hdm.c:534
> which is using the same types. Also 
> drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c in
> rvu_exact_prepare_table_entry...

So using gcc-8.2.1 20181130 I see the same error. However
drivers/cxl/core/hdm.c still compiler cleanly.

Now USBDRD_UCTL_CTL_H_CLKDIV_SEL is defined as GENMASK_ULL(26, 24).
Making is GENMASK_ULL(27, 24) makes error go away. Also making clk_div
array in dwc3_octeon_get_divider one element shorter makes error go
away.

To me it seems gcc-8 figures out the result of dwc3_octeon_get_divider
can be greater than 7 and produces error. Cannot happen in the real
world. Should we make gcc-8 stand corrected?

> Anyway, let me setup gcc-8 toolchain :)
> 
> >   Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
> > 
> > Links:
> > -----
> >  -
> > https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230808/testrun/18882876/suite/build/test/gcc-8-cavium_octeon_defconfig/log
> >  -
> > https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230808/testrun/18882876/suite/build/test/gcc-8-cavium_octeon_defconfig/history/
> > 
> > Steps to reproduce:
> > ------------
> >   tuxmake --runtime podman --target-arch mips --toolchain gcc-8
> > --kconfig cavium_octeon_defconfig
> >    -
> > https://storage.tuxsuite.com/public/linaro/lkft/builds/2TgoAZwerJ28UWHyqfQUiaYYhrl/tuxmake_reproducer.sh
> > 
> > --
> > Linaro LKFT
> > https://lkft.linaro.org
> 


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

* Re: next: mips: cavium_octeon_defconfig: gcc-8 - dwc3-octeon.c:502:8: include/linux/compiler_types.h:397:38: error: call to '__compiletime_assert_335' declared with attribute error: FIELD_PREP: value too large for the field _compiletime_assert
  2023-08-08  7:45 ` Ladislav Michl
  2023-08-08  9:10   ` Ladislav Michl
@ 2023-08-09  6:29   ` Naresh Kamboju
  1 sibling, 0 replies; 4+ messages in thread
From: Naresh Kamboju @ 2023-08-09  6:29 UTC (permalink / raw)
  To: Ladislav Michl
  Cc: Linux-Next Mailing List, linux-usb, linux-mips, lkft-triage,
	Thinh.Nguyen, Greg Kroah-Hartman, Arnd Bergmann, Anders Roxell,
	Thomas Bogendoerfer

On Tue, 8 Aug 2023 at 13:15, Ladislav Michl <ladis@triops.cz> wrote:
>
> Hi Naresh,
>
> On Tue, 2023-08-08 at 12:41 +0530, Naresh Kamboju wrote:
> > [My two cents]
> >
> > While building Linux next-20230808 mips cavium_octeon_defconfig with
> > gcc-8
> > failed with below warnings and errors.
> >
> > Build log:
> > ----------
> >
> > In function 'dwc3_octeon_setup.isra.4',
> >     inlined from 'dwc3_octeon_probe' at drivers/usb/dwc3/dwc3-
> > octeon.c:502:8:
> > include/linux/compiler_types.h:397:38: error: call to
> > '__compiletime_assert_335' declared with attribute error: FIELD_PREP:
> > value too large for the field
> >   _compiletime_assert(condition, msg, __compiletime_assert_,
> > __COUNTER__)
> >                                       ^
> > include/linux/compiler_types.h:378:4: note: in definition of macro
> > '__compiletime_assert'
> >     prefix ## suffix();    \
> >     ^~~~~~
>
> Not sure what is really going on there. Code compiles even using 32bit
> toochains without warnings and such an assignments are used in other
> kernel drivers. See for example drivers/cxl/core/hdm.c:534 which is
> using the same types. Also
> drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c in
> rvu_exact_prepare_table_entry...
>
> Anyway, let me setup gcc-8 toolchain :)

For your reference,
These are steps to setup toolchain and build with single command,

# TuxMake is a command line tool and Python library that provides
# portable and repeatable Linux kernel builds across a variety of
# architectures, toolchains, kernel configurations, and make targets.
#
# TuxMake supports the concept of runtimes.
# See https://docs.tuxmake.org/runtimes/, for that to work it requires
# that you install podman or docker on your system.
#
# 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.
# Original tuxmake command with fragments listed below.
# tuxmake --runtime podman --target-arch mips --toolchain gcc-8
--kconfig cavium_octeon_defconfig


tuxmake --runtime podman --target-arch mips --toolchain gcc-8
--kconfig https://storage.tuxsuite.com/public/linaro/lkft/builds/2TgoAZwerJ28UWHyqfQUiaYYhrl/config


Steps to reproduce:
------------
  tuxmake --runtime podman --target-arch mips --toolchain gcc-8
--kconfig cavium_octeon_defconfig


   - https://storage.tuxsuite.com/public/linaro/lkft/builds/2TgoAZwerJ28UWHyqfQUiaYYhrl/tuxmake_reproducer.sh


- Naresh

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

end of thread, other threads:[~2023-08-09  6:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-08  7:11 next: mips: cavium_octeon_defconfig: gcc-8 - dwc3-octeon.c:502:8: include/linux/compiler_types.h:397:38: error: call to '__compiletime_assert_335' declared with attribute error: FIELD_PREP: value too large for the field _compiletime_assert Naresh Kamboju
2023-08-08  7:45 ` Ladislav Michl
2023-08-08  9:10   ` Ladislav Michl
2023-08-09  6:29   ` Naresh Kamboju

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