linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [renesas-drivers:topic/clk-r8a77990-z2-v3 11/13] rcar-gen3-cpg.c:undefined reference to `__udivdi3'
@ 2019-02-05 23:37 kbuild test robot
  2019-02-06  7:03 ` Geert Uytterhoeven
  0 siblings, 1 reply; 3+ messages in thread
From: kbuild test robot @ 2019-02-05 23:37 UTC (permalink / raw)
  To: Simon Horman; +Cc: kbuild-all, linux-renesas-soc, Geert Uytterhoeven

[-- Attachment #1: Type: text/plain, Size: 879 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git topic/clk-r8a77990-z2-v3
head:   3423d0ef4af282d1a1021b40cc2e739c08c9046b
commit: 0961e355977f7806b926ea0ae29c5cffa7867894 [11/13] clk: renesas: rcar-gen3: Support Z and Z2 clocks with high frequency parents
config: i386-allmodconfig (attached as .config)
compiler: gcc-8 (Debian 8.2.0-14) 8.2.0
reproduce:
        git checkout 0961e355977f7806b926ea0ae29c5cffa7867894
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   ld: drivers/clk/renesas/rcar-gen3-cpg.o: in function `cpg_z_clk_set_rate':
>> rcar-gen3-cpg.c:(.text+0x13c): undefined reference to `__udivdi3'

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 66633 bytes --]

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

* Re: [renesas-drivers:topic/clk-r8a77990-z2-v3 11/13] rcar-gen3-cpg.c:undefined reference to `__udivdi3'
  2019-02-05 23:37 [renesas-drivers:topic/clk-r8a77990-z2-v3 11/13] rcar-gen3-cpg.c:undefined reference to `__udivdi3' kbuild test robot
@ 2019-02-06  7:03 ` Geert Uytterhoeven
  2019-02-11 12:47   ` Geert Uytterhoeven
  0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2019-02-06  7:03 UTC (permalink / raw)
  To: kbuild test robot
  Cc: Simon Horman, kbuild-all, Linux-Renesas, Geert Uytterhoeven

On Wed, Feb 6, 2019 at 12:38 AM kbuild test robot <lkp@intel.com> wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git topic/clk-r8a77990-z2-v3
> head:   3423d0ef4af282d1a1021b40cc2e739c08c9046b
> commit: 0961e355977f7806b926ea0ae29c5cffa7867894 [11/13] clk: renesas: rcar-gen3: Support Z and Z2 clocks with high frequency parents
> config: i386-allmodconfig (attached as .config)
> compiler: gcc-8 (Debian 8.2.0-14) 8.2.0
> reproduce:
>         git checkout 0961e355977f7806b926ea0ae29c5cffa7867894
>         # save the attached .config to linux build tree
>         make ARCH=i386
>
> All errors (new ones prefixed by >>):
>
>    ld: drivers/clk/renesas/rcar-gen3-cpg.o: in function `cpg_z_clk_set_rate':
> >> rcar-gen3-cpg.c:(.text+0x13c): undefined reference to `__udivdi3'

Thanks for the report!

I guess this is due to

+       mult = DIV_ROUND_CLOSEST(rate * 32ULL * zclk->fixed_div, parent_rate);

While Simon had tested this on arm, apparently it fails on (at least) i386
and mips.

Changing "32ULL" to "32UL" should fix this, but means a sure overflow if this
code is ever used on or copied for a 32-bit platform.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [renesas-drivers:topic/clk-r8a77990-z2-v3 11/13] rcar-gen3-cpg.c:undefined reference to `__udivdi3'
  2019-02-06  7:03 ` Geert Uytterhoeven
@ 2019-02-11 12:47   ` Geert Uytterhoeven
  0 siblings, 0 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2019-02-11 12:47 UTC (permalink / raw)
  To: kbuild test robot
  Cc: Simon Horman, kbuild-all, Linux-Renesas, Geert Uytterhoeven

On Wed, Feb 6, 2019 at 8:03 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On Wed, Feb 6, 2019 at 12:38 AM kbuild test robot <lkp@intel.com> wrote:
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git topic/clk-r8a77990-z2-v3
> > head:   3423d0ef4af282d1a1021b40cc2e739c08c9046b
> > commit: 0961e355977f7806b926ea0ae29c5cffa7867894 [11/13] clk: renesas: rcar-gen3: Support Z and Z2 clocks with high frequency parents
> > config: i386-allmodconfig (attached as .config)
> > compiler: gcc-8 (Debian 8.2.0-14) 8.2.0
> > reproduce:
> >         git checkout 0961e355977f7806b926ea0ae29c5cffa7867894
> >         # save the attached .config to linux build tree
> >         make ARCH=i386
> >
> > All errors (new ones prefixed by >>):
> >
> >    ld: drivers/clk/renesas/rcar-gen3-cpg.o: in function `cpg_z_clk_set_rate':
> > >> rcar-gen3-cpg.c:(.text+0x13c): undefined reference to `__udivdi3'
>
> Thanks for the report!
>
> I guess this is due to
>
> +       mult = DIV_ROUND_CLOSEST(rate * 32ULL * zclk->fixed_div, parent_rate);
>
> While Simon had tested this on arm, apparently it fails on (at least) i386
> and mips.

FTR, it does fail on arm32 with arm-linux-gnueabihf-gcc 7.3.0.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

end of thread, other threads:[~2019-02-11 12:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-05 23:37 [renesas-drivers:topic/clk-r8a77990-z2-v3 11/13] rcar-gen3-cpg.c:undefined reference to `__udivdi3' kbuild test robot
2019-02-06  7:03 ` Geert Uytterhoeven
2019-02-11 12:47   ` Geert Uytterhoeven

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