[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/tes... - https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230808/tes...
Steps to reproduce: ------------ tuxmake --runtime podman --target-arch mips --toolchain gcc-8 --kconfig cavium_octeon_defconfig - https://storage.tuxsuite.com/public/linaro/lkft/builds/2TgoAZwerJ28UWHyqfQUi...
-- Linaro LKFT https://lkft.linaro.org
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/tes... - https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230808/tes...
Steps to reproduce:
tuxmake --runtime podman --target-arch mips --toolchain gcc-8 --kconfig cavium_octeon_defconfig - https://storage.tuxsuite.com/public/linaro/lkft/builds/2TgoAZwerJ28UWHyqfQUi...
-- Linaro LKFT https://lkft.linaro.org
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/tes... - https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230808/tes...
Steps to reproduce:
tuxmake --runtime podman --target-arch mips --toolchain gcc-8 --kconfig cavium_octeon_defconfig - https://storage.tuxsuite.com/public/linaro/lkft/builds/2TgoAZwerJ28UWHyqfQUi...
-- Linaro LKFT https://lkft.linaro.org
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/2TgoAZwerJ28UWHyqfQUi...
Steps to reproduce: ------------ tuxmake --runtime podman --target-arch mips --toolchain gcc-8 --kconfig cavium_octeon_defconfig
- https://storage.tuxsuite.com/public/linaro/lkft/builds/2TgoAZwerJ28UWHyqfQUi...
- Naresh