Re: [pm:bleeding-edge 12/41] utstrsuppt.c:undefined reference to `__udivdi3'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday, October 3, 2017 11:44:38 PM CEST Moore, Robert wrote:
> 
> > -----Original Message-----
> > From: Rafael J. Wysocki [mailto:rjw@xxxxxxxxxxxxx]
> > Sent: Tuesday, October 3, 2017 2:18 PM
> > To: Moore, Robert <robert.moore@xxxxxxxxx>
> > Cc: Rafael J. Wysocki <rafael@xxxxxxxxxx>; Zheng, Lv
> > <lv.zheng@xxxxxxxxx>; Wu, Fengguang <fengguang.wu@xxxxxxxxx>; kbuild-
> > all@xxxxxx; linux-acpi@xxxxxxxxxxxxxxx; devel@xxxxxxxxxx; linux-
> > pm@xxxxxxxxxxxxxxx
> > Subject: Re: [pm:bleeding-edge 12/41] utstrsuppt.c:undefined reference
> > to `__udivdi3'
> > 
> > On Tuesday, October 3, 2017 11:23:36 PM CEST Moore, Robert wrote:
> > >
> > > > -----Original Message-----
> > > > From: Rafael J. Wysocki [mailto:rjw@xxxxxxxxxxxxx]
> > > > Sent: Tuesday, October 3, 2017 2:07 PM
> > > > To: Moore, Robert <robert.moore@xxxxxxxxx>
> > > > Cc: Rafael J. Wysocki <rafael@xxxxxxxxxx>; Zheng, Lv
> > > > <lv.zheng@xxxxxxxxx>; Wu, Fengguang <fengguang.wu@xxxxxxxxx>;
> > > > kbuild- all@xxxxxx; linux-acpi@xxxxxxxxxxxxxxx; devel@xxxxxxxxxx;
> > > > linux- pm@xxxxxxxxxxxxxxx
> > > > Subject: Re: [pm:bleeding-edge 12/41] utstrsuppt.c:undefined
> > > > reference to `__udivdi3'
> > > >
> > > > On Tuesday, October 3, 2017 10:50:11 PM CEST Rafael J. Wysocki
> > wrote:
> > > > > On Tuesday, October 3, 2017 9:41:23 PM CEST Moore, Robert wrote:
> > > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: rjwysocki@xxxxxxxxx [mailto:rjwysocki@xxxxxxxxx] On
> > > > > > > Behalf Of Rafael J. Wysocki
> > > > > > > Sent: Tuesday, October 3, 2017 11:21 AM
> > > > > > > To: Moore, Robert <robert.moore@xxxxxxxxx>
> > > > > > > Cc: Rafael J. Wysocki <rjw@xxxxxxxxxxxxx>; Zheng, Lv
> > > > > > > <lv.zheng@xxxxxxxxx>; Wu, Fengguang <fengguang.wu@xxxxxxxxx>;
> > > > > > > kbuild- all@xxxxxx; linux-acpi@xxxxxxxxxxxxxxx;
> > > > > > > devel@xxxxxxxxxx;
> > > > > > > linux- pm@xxxxxxxxxxxxxxx
> > > > > > > Subject: Re: [pm:bleeding-edge 12/41] utstrsuppt.c:undefined
> > > > > > > reference to `__udivdi3'
> > > > > > >
> > > > > > > On Tue, Oct 3, 2017 at 6:43 PM, Moore, Robert
> > > > > > > <robert.moore@xxxxxxxxx>
> > > > > > > wrote:
> > > > > > > >
> > > > > > > >
> > > > > > > >> -----Original Message-----
> > > > > > > >> From: Rafael J. Wysocki [mailto:rjw@xxxxxxxxxxxxx]
> > > > > > > >> Sent: Tuesday, October 3, 2017 4:32 AM
> > > > > > > >> To: Moore, Robert <robert.moore@xxxxxxxxx>; Zheng, Lv
> > > > > > > >> <lv.zheng@xxxxxxxxx>
> > > > > > > >> Cc: Wu, Fengguang <fengguang.wu@xxxxxxxxx>;
> > > > > > > >> kbuild-all@xxxxxx;
> > > > > > > >> linux- acpi@xxxxxxxxxxxxxxx; devel@xxxxxxxxxx;
> > > > > > > >> linux-pm@xxxxxxxxxxxxxxx
> > > > > > > >> Subject: Re: [pm:bleeding-edge 12/41]
> > > > > > > >> utstrsuppt.c:undefined reference to `__udivdi3'
> > > > > > > >>
> > > > > > > >> On Tuesday, October 3, 2017 4:25:52 AM CEST kbuild test
> > > > > > > >> robot
> > > > wrote:
> > > > > > > >> > tree:
> > > > > > > https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-
> > > > > > > >> pm.git bleeding-edge
> > > > > > > >> > head:   09b089a247ea7272df93a2116368bf24b656cd65
> > > > > > > >> > commit: 05545b3fb6eab35290413211617793bc274e136b [12/41]
> > > > ACPICA:
> > > > > > > >> Restructure/cleanup all string-to-integer conversion
> > > > > > > >> functions
> > > > > > > >> > config: i386-defconfig (attached as .config)
> > > > > > > >> > compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
> > > > > > > >> > reproduce:
> > > > > > > >> >         git checkout
> > 05545b3fb6eab35290413211617793bc274e136b
> > > > > > > >> >         # save the attached .config to linux build tree
> > > > > > > >> >         make ARCH=i386
> > > > > > > >> >
> > > > > > > >> > All errors (new ones prefixed by >>):
> > > > > > > >> >
> > > > > > > >> >    drivers/acpi/acpica/utstrsuppt.o: In function
> > > > > > > >> `acpi_ut_insert_digit':
> > > > > > > >> > >> utstrsuppt.c:(.text+0x33): undefined reference to
> > > > `__udivdi3'
> > > > > > > >>
> > > > > > > >> __udivdi3() doesn't work on 32-bit x86 AFAICS.
> > > > > > > >>
> > > > > > > >> Can we avoid using it or at least put it under #ifdef
> > somehow?
> > > > > > > > [Moore, Robert]
> > > > > > > >
> > > > > > > >
> > > > > > > > I take it that __udivdi3 is a 64-bit divide?
> > > > > > >
> > > > > > > Practically, yes (AFAICS).
> > > > > > >
> > > > > > > > We do have a local divide implementation(s) for things like
> > > > this.
> > > > > > > >
> > > > > > > > However, I don't see a divide in ut_insert_digit; There is a
> > > > > > > > 64-bit
> > > > > > > divide in ut_strtoul_add_64, however.
> > > > > > [Moore, Robert]
> > > > > >
> > > > > > Oops, sorry. The divided is in strtoul_multiply_64. We are
> > > > > > checking for an overflow condition up front.
> > > > >
> > > > > But this is a plain division, so it looks like a build system or
> > > > > compiler issue to me.
> > > >
> > > > Well, OK.  Plain u64 / u64 divisions need to be avoided for stuff to
> > > > build on 32-bit x86.
> > > >
> > > [Moore, Robert]
> > >
> > > Even u64/u32.
> > >
> > > Anyway, this is no problem to change since we already have the
> > functionality locally.
> > 
> > OK
> > 
> > Can you please send me a patch against upstream ACPICA to change this?
> > 
> > I'll try do fold it in. :-)
> [Moore, Robert] 
> 
> I'll need to do it and then run some tests on it, so when it is done, I'll send it. I envision 2
> 
> [Moore, Robert] I think it will look something like this:
> 
>     UINT64                  Quotient;
> 
> ...
> 
>     /* Check for 64-bit overflow before the actual multiplication */
> 
>     AcpiUtShortDivide (ACPI_UINT64_MAX, (UINT32) Multiplier, &Quotient, NULL);
>     if (Multiplicand > Quotient)
>     {
>         return (AE_NUMERIC_OVERFLOW);
>     }

OK, thanks!

I hope I have not butchered it. :-)

Anyway, it's in my bleeding-edge branch now.

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux