The arm builds failed with gcc-8 on Linux next-20241028 and builds pass with gcc-13.
First seen on Linux next-20241028 tag. Good: next-20241025 Bad: next-20241028
arm: build: * gcc-8-imx_v6_v7_defconfig * gcc-8-defconfig * gcc-8-omap2plus_defconfig * gcc-8-davinci_all_defconfig
Reported-by: Linux Kernel Functional Testing lkft@linaro.org
Build log: --------- ERROR: modpost: "__aeabi_uldivmod" [drivers/media/dvb-frontends/cxd2841er.ko] undefined! make[3]: *** [/builds/linux/scripts/Makefile.modpost:145: Module.symvers] Error 1 make[3]: Target '__modpost' not remade because of errors.
Build image: ----------- - https://storage.tuxsuite.com/public/linaro/lkft/builds/2o9bKKvq45ZlybLVnQ1Bl... - https://storage.tuxsuite.com/public/linaro/lkft/builds/2o9bKKvq45ZlybLVnQ1Bl...
Steps to reproduce: ------------ - tuxmake --runtime podman --target-arch arm --toolchain gcc-8 --kconfig defconfig
metadata: ---- git describe: next-20241030 git repo: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git sha: 86e3904dcdc7e70e3257fc1de294a1b75f3d8d04 kernel config: https://storage.tuxsuite.com/public/linaro/lkft/builds/2o9bKKvq45ZlybLVnQ1Bl... build url: https://storage.tuxsuite.com/public/linaro/lkft/builds/2o9bKKvq45ZlybLVnQ1Bl... toolchain: gcc-8 config: defconfig arch: arm
-- Linaro LKFT https://lkft.linaro.org
Is it possible to tie this to a commit?
This is a u64 variable getting divided somewhere or maybe the divisor is a u64? But there haven't been any recent changes to the driver so probably the change happened in a header file? I looked the differences between the preprocessed .i files from before and after and nothing jumped out at me.
I don't have a copy of gcc-8...
regards, dan carpenter
On Wed, Oct 30, 2024 at 06:53:01PM +0530, Naresh Kamboju wrote:
The arm builds failed with gcc-8 on Linux next-20241028 and builds pass with gcc-13.
First seen on Linux next-20241028 tag. Good: next-20241025 Bad: next-20241028
arm: build: * gcc-8-imx_v6_v7_defconfig * gcc-8-defconfig * gcc-8-omap2plus_defconfig * gcc-8-davinci_all_defconfig
Reported-by: Linux Kernel Functional Testing lkft@linaro.org
Build log:
ERROR: modpost: "__aeabi_uldivmod" [drivers/media/dvb-frontends/cxd2841er.ko] undefined! make[3]: *** [/builds/linux/scripts/Makefile.modpost:145: Module.symvers] Error 1 make[3]: Target '__modpost' not remade because of errors.
Build image:
- https://storage.tuxsuite.com/public/linaro/lkft/builds/2o9bKKvq45ZlybLVnQ1Bl...
- https://storage.tuxsuite.com/public/linaro/lkft/builds/2o9bKKvq45ZlybLVnQ1Bl...
Steps to reproduce:
- tuxmake --runtime podman --target-arch arm --toolchain gcc-8
--kconfig defconfig
metadata:
git describe: next-20241030 git repo: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git sha: 86e3904dcdc7e70e3257fc1de294a1b75f3d8d04 kernel config: https://storage.tuxsuite.com/public/linaro/lkft/builds/2o9bKKvq45ZlybLVnQ1Bl... build url: https://storage.tuxsuite.com/public/linaro/lkft/builds/2o9bKKvq45ZlybLVnQ1Bl... toolchain: gcc-8 config: defconfig arch: arm
-- Linaro LKFT https://lkft.linaro.org
Arnd, can you take a look at this?
This patch fixes the build, but obviously breaks the kernel so don't apply it. I don't know how do_div() works or what changed though. All this code looks ancient.
regards, dan carpenter
diff --git a/drivers/media/dvb-frontends/cxd2841er.c b/drivers/media/dvb-frontends/cxd2841er.c index d925ca24183b..e3131f5c6708 100644 --- a/drivers/media/dvb-frontends/cxd2841er.c +++ b/drivers/media/dvb-frontends/cxd2841er.c @@ -314,7 +314,7 @@ static u32 cxd2841er_calc_iffreq_xtal(enum cxd2841er_xtal xtal, u32 ifhz) u64 tmp;
tmp = (u64) ifhz * 16777216; - do_div(tmp, ((xtal == SONY_XTAL_24000) ? 48000000 : 41000000)); +// do_div(tmp, ((xtal == SONY_XTAL_24000) ? 48000000 : 41000000));
return (u32) tmp; }
On Thu, Oct 31, 2024, at 12:27, Dan Carpenter wrote:
Arnd, can you take a look at this?
diff --git a/drivers/media/dvb-frontends/cxd2841er.c b/drivers/media/dvb-frontends/cxd2841er.c index d925ca24183b..e3131f5c6708 100644 --- a/drivers/media/dvb-frontends/cxd2841er.c +++ b/drivers/media/dvb-frontends/cxd2841er.c @@ -314,7 +314,7 @@ static u32 cxd2841er_calc_iffreq_xtal(enum cxd2841er_xtal xtal, u32 ifhz) u64 tmp;
tmp = (u64) ifhz * 16777216;
- do_div(tmp, ((xtal == SONY_XTAL_24000) ? 48000000 : 41000000));
+// do_div(tmp, ((xtal == SONY_XTAL_24000) ? 48000000 : 41000000));
return (u32) tmp; }
Not sure what is happening exactly, probably something where __builtin_constant_p() is inconclusive. The patch below seems to address it without impairing readability.
Arnd
--- a/drivers/media/dvb-frontends/cxd2841er.c +++ b/drivers/media/dvb-frontends/cxd2841er.c @@ -311,12 +311,8 @@ static int cxd2841er_set_reg_bits(struct cxd2841er_priv *priv,
static u32 cxd2841er_calc_iffreq_xtal(enum cxd2841er_xtal xtal, u32 ifhz) { - u64 tmp; - - tmp = (u64) ifhz * 16777216; - do_div(tmp, ((xtal == SONY_XTAL_24000) ? 48000000 : 41000000)); - - return (u32) tmp; + return div_u64(ifhz * 16777216ull, + (xtal == SONY_XTAL_24000) ? 48000000 : 41000000); }
static u32 cxd2841er_calc_iffreq(u32 ifhz)