linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* ERROR: "__aeabi_uldivmod" [drivers/pinctrl/pinctrl-single.ko] undefined!
@ 2013-01-11 15:00 Russell King - ARM Linux
  2013-01-11 20:44 ` Linus Walleij
  0 siblings, 1 reply; 3+ messages in thread
From: Russell King - ARM Linux @ 2013-01-11 15:00 UTC (permalink / raw)
  To: linux-arm-kernel

Linus,

The above error happens in builds including pinctrl-single - the reason
is this, where resource_size_t may be 64-bit.

                gpio->range.pin_base = (r.start - pcs->res->start) / mux_bytes;
                gpio->range.npins = (r.end - r.start) / mux_bytes + 1;

This leads to a 64-bit division by an extended 64-bit, resulting in the
call to our (unimplemented) 64-bit-by-64-bit division routines.

This needs fixing - you probably want to cast the difference down to an
'unsigned' first, and also maybe check that it does fit in an unsigned
too?

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

* ERROR: "__aeabi_uldivmod" [drivers/pinctrl/pinctrl-single.ko] undefined!
  2013-01-11 15:00 ERROR: "__aeabi_uldivmod" [drivers/pinctrl/pinctrl-single.ko] undefined! Russell King - ARM Linux
@ 2013-01-11 20:44 ` Linus Walleij
  2013-01-11 23:38   ` Tony Lindgren
  0 siblings, 1 reply; 3+ messages in thread
From: Linus Walleij @ 2013-01-11 20:44 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jan 11, 2013 at 4:00 PM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:

> The above error happens in builds including pinctrl-single - the reason
> is this, where resource_size_t may be 64-bit.
>
>                 gpio->range.pin_base = (r.start - pcs->res->start) / mux_bytes;
>                 gpio->range.npins = (r.end - r.start) / mux_bytes + 1;
>
> This leads to a 64-bit division by an extended 64-bit, resulting in the
> call to our (unimplemented) 64-bit-by-64-bit division routines.
>
> This needs fixing - you probably want to cast the difference down to an
> 'unsigned' first, and also maybe check that it does fit in an unsigned
> too?

Agreed, Haojian can you provide a tested patch for this?
I think you added this code...

Tony: please check and ACK.

Yours,
Linus Walleij

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

* ERROR: "__aeabi_uldivmod" [drivers/pinctrl/pinctrl-single.ko] undefined!
  2013-01-11 20:44 ` Linus Walleij
@ 2013-01-11 23:38   ` Tony Lindgren
  0 siblings, 0 replies; 3+ messages in thread
From: Tony Lindgren @ 2013-01-11 23:38 UTC (permalink / raw)
  To: linux-arm-kernel

* Linus Walleij <linus.walleij@linaro.org> [130111 12:47]:
> On Fri, Jan 11, 2013 at 4:00 PM, Russell King - ARM Linux
> <linux@arm.linux.org.uk> wrote:
> 
> > The above error happens in builds including pinctrl-single - the reason
> > is this, where resource_size_t may be 64-bit.
> >
> >                 gpio->range.pin_base = (r.start - pcs->res->start) / mux_bytes;
> >                 gpio->range.npins = (r.end - r.start) / mux_bytes + 1;
> >
> > This leads to a 64-bit division by an extended 64-bit, resulting in the
> > call to our (unimplemented) 64-bit-by-64-bit division routines.
> >
> > This needs fixing - you probably want to cast the difference down to an
> > 'unsigned' first, and also maybe check that it does fit in an unsigned
> > too?
> 
> Agreed, Haojian can you provide a tested patch for this?
> I think you added this code...
> 
> Tony: please check and ACK.

OK will check and ack.

Tony

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

end of thread, other threads:[~2013-01-11 23:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-11 15:00 ERROR: "__aeabi_uldivmod" [drivers/pinctrl/pinctrl-single.ko] undefined! Russell King - ARM Linux
2013-01-11 20:44 ` Linus Walleij
2013-01-11 23:38   ` Tony Lindgren

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