2023-07-25 10:53:12

by kernel test robot

[permalink] [raw]
Subject: pwm-rz-mtu3.c:undefined reference to `clk_rate_exclusive_put'

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 0b5547c51827e053cc754db47d3ec3e6c2c451d2
commit: 254d3a727421ccc935f085eaa9bae51cb6c9df25 pwm: Add Renesas RZ/G2L MTU3a PWM driver
date: 5 weeks ago
config: m68k-randconfig-r035-20230725 (https://download.01.org/0day-ci/archive/20230725/[email protected]/config)
compiler: m68k-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230725/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

m68k-linux-ld: section .rodata VMA [00002000,009a764f] overlaps section .text VMA [00000400,012a124f]
m68k-linux-ld: drivers/pwm/pwm-rz-mtu3.o: in function `rz_mtu3_pwm_pm_disable':
>> pwm-rz-mtu3.c:(.text+0x114): undefined reference to `clk_rate_exclusive_put'
m68k-linux-ld: drivers/pwm/pwm-rz-mtu3.o: in function `rz_mtu3_pwm_probe':
>> pwm-rz-mtu3.c:(.text+0x32c): undefined reference to `clk_rate_exclusive_get'
>> m68k-linux-ld: pwm-rz-mtu3.c:(.text+0x380): undefined reference to `clk_rate_exclusive_put'
m68k-linux-ld: pwm-rz-mtu3.c:(.text+0x400): undefined reference to `clk_rate_exclusive_put'

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


2023-07-25 14:21:16

by Biju Das

[permalink] [raw]
Subject: RE: pwm-rz-mtu3.c:undefined reference to `clk_rate_exclusive_put'

Hi kernel test robot,

I have fixed the original issue by adding dependency to COMMON_CLK.

But I hit below error which related to m68k compiler/arch specific.
Can you please fix this issue?

/home/user/0day/gcc-12.3.0-nolibc/m68k-linux/bin/m68k-linux-ld: section .rodata VMA [00002000,009a758f] overlaps section .text VMA [00000400,012a08ff]
make[2]: *** [../scripts/Makefile.vmlinux:35: vmlinux] Error 1
make[2]: Target '__default' not remade because of errors.
make[1]: *** [/builds/0/rzg2l-linux/Makefile:1250: vmlinux] Error 2
make[1]: Target '__all' not remade because of errors.
make[1]: Leaving directory '/builds/0/rzg2l-linux/build_dir'
make: *** [Makefile:226: __sub-make] Error 2
make: Target '__all' not remade because of errors.

Note:
You can reproduce this issue by

diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig
index 6210babb0741..eeecf249f372 100644
--- a/drivers/pwm/Kconfig
+++ b/drivers/pwm/Kconfig
@@ -506,6 +506,7 @@ config PWM_ROCKCHIP
config PWM_RZ_MTU3
tristate "Renesas RZ/G2L MTU3a PWM Timer support"
depends on RZ_MTU3 || COMPILE_TEST
+ depends on COMMON_CLK
depends on HAS_IOMEM
help
This driver exposes the MTU3a PWM Timer controller found in Renesas
--

Cheers,
Biju

> -----Original Message-----
> From: kernel test robot <[email protected]>
> Sent: Tuesday, July 25, 2023 11:02 AM
> To: Biju Das <[email protected]>
> Cc: [email protected]; [email protected]; Thierry
> Reding <[email protected]>; Uwe Kleine-K?nig <u.kleine-
> [email protected]>
> Subject: pwm-rz-mtu3.c:undefined reference to `clk_rate_exclusive_put'
>
> tree:
> https://git.ke/
> rnel.org%2Fpub%2Fscm%2Flinux%2Fkernel%2Fgit%2Ftorvalds%2Flinux.git&data=
> 05%7C01%7Cbiju.das.jz%40bp.renesas.com%7Cddafcfaf3d0740bb720d08db8cf6482
> 0%7C53d82571da1947e49cb4625a166a4a2a%7C0%7C0%7C638258761619965319%7CUnkn
> own%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLC
> JXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=idIXqpIejeDQMi9x3H7uoGxBlGPkBj6OONAc%
> 2FUX%2Bq00%3D&reserved=0 master
> head: 0b5547c51827e053cc754db47d3ec3e6c2c451d2
> commit: 254d3a727421ccc935f085eaa9bae51cb6c9df25 pwm: Add Renesas RZ/G2L
> MTU3a PWM driver
> date: 5 weeks ago
> config: m68k-randconfig-r035-20230725
> (https://downl/
> oad.01.org%2F0day-ci%2Farchive%2F20230725%2F202307251752.vLfmmhYm-
> lkp%40intel.com%2Fconfig&data=05%7C01%7Cbiju.das.jz%40bp.renesas.com%7Cd
> dafcfaf3d0740bb720d08db8cf64820%7C53d82571da1947e49cb4625a166a4a2a%7C0%7
> C0%7C638258761619965319%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQ
> IjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=ZVZQjRa
> BlITtV7ooqne%2FbgVayvBT9Z2kpNW%2F%2FOGmOig%3D&reserved=0)
> compiler: m68k-linux-gcc (GCC) 12.3.0
> reproduce:
> (https://downl/
> oad.01.org%2F0day-ci%2Farchive%2F20230725%2F202307251752.vLfmmhYm-
> lkp%40intel.com%2Freproduce&data=05%7C01%7Cbiju.das.jz%40bp.renesas.com%
> 7Cddafcfaf3d0740bb720d08db8cf64820%7C53d82571da1947e49cb4625a166a4a2a%7C
> 0%7C0%7C638258761619965319%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiL
> CJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=ZHl9
> ZDmwIItVHzIfQQ9IqncDcsvrRhgbk2dAJrcrWyg%3D&reserved=0)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new
> version of the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <[email protected]>
> | Closes:
> | https://lore/
> | .kernel.org%2Foe-kbuild-all%2F202307251752.vLfmmhYm-lkp%40intel.com%2F
> | &data=05%7C01%7Cbiju.das.jz%40bp.renesas.com%7Cddafcfaf3d0740bb720d08d
> | b8cf64820%7C53d82571da1947e49cb4625a166a4a2a%7C0%7C0%7C638258761619965
> | 319%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTi
> | I6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=pnWkQUcmvfm4pgg5KskiRmp
> | YzCe13tuQ4GMw7GBsRHc%3D&reserved=0
>
> All errors (new ones prefixed by >>):
>
> m68k-linux-ld: section .rodata VMA [00002000,009a764f] overlaps
> section .text VMA [00000400,012a124f]
> m68k-linux-ld: drivers/pwm/pwm-rz-mtu3.o: in function
> `rz_mtu3_pwm_pm_disable':
> >> pwm-rz-mtu3.c:(.text+0x114): undefined reference to
> `clk_rate_exclusive_put'
> m68k-linux-ld: drivers/pwm/pwm-rz-mtu3.o: in function
> `rz_mtu3_pwm_probe':
> >> pwm-rz-mtu3.c:(.text+0x32c): undefined reference to
> `clk_rate_exclusive_get'
> >> m68k-linux-ld: pwm-rz-mtu3.c:(.text+0x380): undefined reference to
> `clk_rate_exclusive_put'
> m68k-linux-ld: pwm-rz-mtu3.c:(.text+0x400): undefined reference to
> `clk_rate_exclusive_put'
>
> --
> 0-DAY CI Kernel Test Service
> https://github/
> .com%2Fintel%2Flkp-
> tests%2Fwiki&data=05%7C01%7Cbiju.das.jz%40bp.renesas.com%7Cddafcfaf3d074
> 0bb720d08db8cf64820%7C53d82571da1947e49cb4625a166a4a2a%7C0%7C0%7C6382587
> 61619965319%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIi
> LCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=A2zogmxOdQAYSC1ogk2
> IneNrLIdpV2xsmI14gNmbG7Y%3D&reserved=0

2023-07-25 16:36:21

by Thierry Reding

[permalink] [raw]
Subject: Re: pwm-rz-mtu3.c:undefined reference to `clk_rate_exclusive_put'

On Tue, Jul 25, 2023 at 01:51:38PM +0000, Biju Das wrote:
> Hi kernel test robot,
>
> I have fixed the original issue by adding dependency to COMMON_CLK.
>
> But I hit below error which related to m68k compiler/arch specific.
> Can you please fix this issue?
>
> /home/user/0day/gcc-12.3.0-nolibc/m68k-linux/bin/m68k-linux-ld: section .rodata VMA [00002000,009a758f] overlaps section .text VMA [00000400,012a08ff]
> make[2]: *** [../scripts/Makefile.vmlinux:35: vmlinux] Error 1
> make[2]: Target '__default' not remade because of errors.
> make[1]: *** [/builds/0/rzg2l-linux/Makefile:1250: vmlinux] Error 2
> make[1]: Target '__all' not remade because of errors.
> make[1]: Leaving directory '/builds/0/rzg2l-linux/build_dir'
> make: *** [Makefile:226: __sub-make] Error 2
> make: Target '__all' not remade because of errors.
>
> Note:
> You can reproduce this issue by
>
> diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig
> index 6210babb0741..eeecf249f372 100644
> --- a/drivers/pwm/Kconfig
> +++ b/drivers/pwm/Kconfig
> @@ -506,6 +506,7 @@ config PWM_ROCKCHIP
> config PWM_RZ_MTU3
> tristate "Renesas RZ/G2L MTU3a PWM Timer support"
> depends on RZ_MTU3 || COMPILE_TEST
> + depends on COMMON_CLK

It probably doesn't change anything about the build issue, but I think a
slightly more correct dependency would be:

depends on HAVE_CLK

Thierry


Attachments:
(No filename) (1.39 kB)
signature.asc (849.00 B)
Download all attachments

2023-07-25 16:44:15

by Biju Das

[permalink] [raw]
Subject: RE: pwm-rz-mtu3.c:undefined reference to `clk_rate_exclusive_put'

Hi Thierry Reding,

Thanks for the feedback.

> -----Original Message-----
> From: Thierry Reding <[email protected]>
> Sent: Tuesday, July 25, 2023 5:21 PM
> To: Biju Das <[email protected]>
> Cc: kernel test robot <[email protected]>; [email protected];
> [email protected]; Uwe Kleine-K?nig <u.kleine-
> [email protected]>
> Subject: Re: pwm-rz-mtu3.c:undefined reference to
> `clk_rate_exclusive_put'
>
> On Tue, Jul 25, 2023 at 01:51:38PM +0000, Biju Das wrote:
> > Hi kernel test robot,
> >
> > I have fixed the original issue by adding dependency to COMMON_CLK.
> >
> > But I hit below error which related to m68k compiler/arch specific.
> > Can you please fix this issue?
> >
> > /home/user/0day/gcc-12.3.0-nolibc/m68k-linux/bin/m68k-linux-ld:
> > section .rodata VMA [00002000,009a758f] overlaps section .text VMA
> > [00000400,012a08ff]
> > make[2]: *** [../scripts/Makefile.vmlinux:35: vmlinux] Error 1
> > make[2]: Target '__default' not remade because of errors.
> > make[1]: *** [/builds/0/rzg2l-linux/Makefile:1250: vmlinux] Error 2
> > make[1]: Target '__all' not remade because of errors.
> > make[1]: Leaving directory '/builds/0/rzg2l-linux/build_dir'
> > make: *** [Makefile:226: __sub-make] Error 2
> > make: Target '__all' not remade because of errors.
> >
> > Note:
> > You can reproduce this issue by
> >
> > diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig index
> > 6210babb0741..eeecf249f372 100644
> > --- a/drivers/pwm/Kconfig
> > +++ b/drivers/pwm/Kconfig
> > @@ -506,6 +506,7 @@ config PWM_ROCKCHIP config PWM_RZ_MTU3
> > tristate "Renesas RZ/G2L MTU3a PWM Timer support"
> > depends on RZ_MTU3 || COMPILE_TEST
> > + depends on COMMON_CLK
>
> It probably doesn't change anything about the build issue, but I think a
> slightly more correct dependency would be:
>
> depends on HAVE_CLK

Nope. I used that one and still got build error. See[2]

[2] https://elixir.bootlin.com/linux/v6.5-rc3/source/drivers/clk/Makefile#L4

Cheers,
Biju

>
> Thierry