All of lore.kernel.org
 help / color / mirror / Atom feed
* [pm:bleeding-edge 12/41] utstrsuppt.c:undefined reference to `__udivdi3'
@ 2017-10-03  2:25 ` kbuild test robot
  0 siblings, 0 replies; 22+ messages in thread
From: kbuild test robot @ 2017-10-03  2:25 UTC (permalink / raw)
  To: Bob Moore
  Cc: kbuild-all, linux-acpi, devel, linux-pm, Rafael J. Wysocki, Lv Zheng

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

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'

---
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: 26533 bytes --]

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

* [Devel] [pm:bleeding-edge 12/41] utstrsuppt.c:undefined reference to `__udivdi3'
@ 2017-10-03  2:25 ` kbuild test robot
  0 siblings, 0 replies; 22+ messages in thread
From: kbuild test robot @ 2017-10-03  2:25 UTC (permalink / raw)
  To: devel

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

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'

---
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: 26533 bytes --]

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

* Re: [pm:bleeding-edge 12/41] utstrsuppt.c:undefined reference to `__udivdi3'
@ 2017-10-03 11:31   ` Rafael J. Wysocki
  0 siblings, 0 replies; 22+ messages in thread
From: Rafael J. Wysocki @ 2017-10-03 11:31 UTC (permalink / raw)
  To: Bob Moore, Lv Zheng
  Cc: kbuild test robot, kbuild-all, linux-acpi, devel, linux-pm

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?

Thanks,
Rafael


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

* Re: [Devel] [pm:bleeding-edge 12/41] utstrsuppt.c:undefined reference to `__udivdi3'
@ 2017-10-03 11:31   ` Rafael J. Wysocki
  0 siblings, 0 replies; 22+ messages in thread
From: Rafael J. Wysocki @ 2017-10-03 11:31 UTC (permalink / raw)
  To: devel

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

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?

Thanks,
Rafael


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

* RE: [pm:bleeding-edge 12/41] utstrsuppt.c:undefined reference to `__udivdi3'
@ 2017-10-03 16:43     ` Moore, Robert
  0 siblings, 0 replies; 22+ messages in thread
From: Moore, Robert @ 2017-10-03 16:43 UTC (permalink / raw)
  To: Rafael J. Wysocki, Zheng, Lv
  Cc: Wu, Fengguang, kbuild-all, linux-acpi, devel, linux-pm



> -----Original Message-----
> From: Rafael J. Wysocki [mailto:rjw@rjwysocki.net]
> Sent: Tuesday, October 3, 2017 4:32 AM
> To: Moore, Robert <robert.moore@intel.com>; Zheng, Lv
> <lv.zheng@intel.com>
> Cc: Wu, Fengguang <fengguang.wu@intel.com>; kbuild-all@01.org; linux-
> acpi@vger.kernel.org; devel@acpica.org; linux-pm@vger.kernel.org
> 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?
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.

So, there are no issues with 64-bit add, subtract, and multiply?



> 
> Thanks,
> Rafael


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

* Re: [Devel] [pm:bleeding-edge 12/41] utstrsuppt.c:undefined reference to `__udivdi3'
@ 2017-10-03 16:43     ` Moore, Robert
  0 siblings, 0 replies; 22+ messages in thread
From: Moore, Robert @ 2017-10-03 16:43 UTC (permalink / raw)
  To: devel

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



> -----Original Message-----
> From: Rafael J. Wysocki [mailto:rjw(a)rjwysocki.net]
> Sent: Tuesday, October 3, 2017 4:32 AM
> To: Moore, Robert <robert.moore(a)intel.com>; Zheng, Lv
> <lv.zheng(a)intel.com>
> Cc: Wu, Fengguang <fengguang.wu(a)intel.com>; kbuild-all(a)01.org; linux-
> acpi(a)vger.kernel.org; devel(a)acpica.org; linux-pm(a)vger.kernel.org
> 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?
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.

So, there are no issues with 64-bit add, subtract, and multiply?



> 
> Thanks,
> Rafael


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

* Re: [pm:bleeding-edge 12/41] utstrsuppt.c:undefined reference to `__udivdi3'
@ 2017-10-03 18:21       ` Rafael J. Wysocki
  0 siblings, 0 replies; 22+ messages in thread
From: Rafael J. Wysocki @ 2017-10-03 18:21 UTC (permalink / raw)
  To: Moore, Robert
  Cc: Rafael J. Wysocki, Zheng, Lv, Wu, Fengguang, kbuild-all,
	linux-acpi, devel, linux-pm

On Tue, Oct 3, 2017 at 6:43 PM, Moore, Robert <robert.moore@intel.com> wrote:
>
>
>> -----Original Message-----
>> From: Rafael J. Wysocki [mailto:rjw@rjwysocki.net]
>> Sent: Tuesday, October 3, 2017 4:32 AM
>> To: Moore, Robert <robert.moore@intel.com>; Zheng, Lv
>> <lv.zheng@intel.com>
>> Cc: Wu, Fengguang <fengguang.wu@intel.com>; kbuild-all@01.org; linux-
>> acpi@vger.kernel.org; devel@acpica.org; linux-pm@vger.kernel.org
>> 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.
>
> So, there are no issues with 64-bit add, subtract, and multiply?

The only problematic one I know of is __udivdi3().

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

* Re: [Devel] [pm:bleeding-edge 12/41] utstrsuppt.c:undefined reference to `__udivdi3'
@ 2017-10-03 18:21       ` Rafael J. Wysocki
  0 siblings, 0 replies; 22+ messages in thread
From: Rafael J. Wysocki @ 2017-10-03 18:21 UTC (permalink / raw)
  To: devel

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

On Tue, Oct 3, 2017 at 6:43 PM, Moore, Robert <robert.moore(a)intel.com> wrote:
>
>
>> -----Original Message-----
>> From: Rafael J. Wysocki [mailto:rjw(a)rjwysocki.net]
>> Sent: Tuesday, October 3, 2017 4:32 AM
>> To: Moore, Robert <robert.moore(a)intel.com>; Zheng, Lv
>> <lv.zheng(a)intel.com>
>> Cc: Wu, Fengguang <fengguang.wu(a)intel.com>; kbuild-all(a)01.org; linux-
>> acpi(a)vger.kernel.org; devel(a)acpica.org; linux-pm(a)vger.kernel.org
>> 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.
>
> So, there are no issues with 64-bit add, subtract, and multiply?

The only problematic one I know of is __udivdi3().

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

* RE: [pm:bleeding-edge 12/41] utstrsuppt.c:undefined reference to `__udivdi3'
@ 2017-10-03 19:41         ` Moore, Robert
  0 siblings, 0 replies; 22+ messages in thread
From: Moore, Robert @ 2017-10-03 19:41 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Rafael J. Wysocki, Zheng, Lv, Wu, Fengguang, kbuild-all,
	linux-acpi, devel, linux-pm



> -----Original Message-----
> From: rjwysocki@gmail.com [mailto:rjwysocki@gmail.com] On Behalf Of
> Rafael J. Wysocki
> Sent: Tuesday, October 3, 2017 11:21 AM
> To: Moore, Robert <robert.moore@intel.com>
> Cc: Rafael J. Wysocki <rjw@rjwysocki.net>; Zheng, Lv
> <lv.zheng@intel.com>; Wu, Fengguang <fengguang.wu@intel.com>; kbuild-
> all@01.org; linux-acpi@vger.kernel.org; devel@acpica.org; linux-
> pm@vger.kernel.org
> 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@intel.com>
> wrote:
> >
> >
> >> -----Original Message-----
> >> From: Rafael J. Wysocki [mailto:rjw@rjwysocki.net]
> >> Sent: Tuesday, October 3, 2017 4:32 AM
> >> To: Moore, Robert <robert.moore@intel.com>; Zheng, Lv
> >> <lv.zheng@intel.com>
> >> Cc: Wu, Fengguang <fengguang.wu@intel.com>; kbuild-all@01.org; linux-
> >> acpi@vger.kernel.org; devel@acpica.org; linux-pm@vger.kernel.org
> >> 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.

> >
> > So, there are no issues with 64-bit add, subtract, and multiply?
> 
> The only problematic one I know of is __udivdi3().

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

* Re: [Devel] [pm:bleeding-edge 12/41] utstrsuppt.c:undefined reference to `__udivdi3'
@ 2017-10-03 19:41         ` Moore, Robert
  0 siblings, 0 replies; 22+ messages in thread
From: Moore, Robert @ 2017-10-03 19:41 UTC (permalink / raw)
  To: devel

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



> -----Original Message-----
> From: rjwysocki(a)gmail.com [mailto:rjwysocki(a)gmail.com] On Behalf Of
> Rafael J. Wysocki
> Sent: Tuesday, October 3, 2017 11:21 AM
> To: Moore, Robert <robert.moore(a)intel.com>
> Cc: Rafael J. Wysocki <rjw(a)rjwysocki.net>; Zheng, Lv
> <lv.zheng(a)intel.com>; Wu, Fengguang <fengguang.wu(a)intel.com>; kbuild-
> all(a)01.org; linux-acpi(a)vger.kernel.org; devel(a)acpica.org; linux-
> pm(a)vger.kernel.org
> 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(a)intel.com>
> wrote:
> >
> >
> >> -----Original Message-----
> >> From: Rafael J. Wysocki [mailto:rjw(a)rjwysocki.net]
> >> Sent: Tuesday, October 3, 2017 4:32 AM
> >> To: Moore, Robert <robert.moore(a)intel.com>; Zheng, Lv
> >> <lv.zheng(a)intel.com>
> >> Cc: Wu, Fengguang <fengguang.wu(a)intel.com>; kbuild-all(a)01.org; linux-
> >> acpi(a)vger.kernel.org; devel(a)acpica.org; linux-pm(a)vger.kernel.org
> >> 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.

> >
> > So, there are no issues with 64-bit add, subtract, and multiply?
> 
> The only problematic one I know of is __udivdi3().

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

* Re: [pm:bleeding-edge 12/41] utstrsuppt.c:undefined reference to `__udivdi3'
@ 2017-10-03 20:50           ` Rafael J. Wysocki
  0 siblings, 0 replies; 22+ messages in thread
From: Rafael J. Wysocki @ 2017-10-03 20:50 UTC (permalink / raw)
  To: Moore, Robert
  Cc: Rafael J. Wysocki, Zheng, Lv, Wu, Fengguang, kbuild-all,
	linux-acpi, devel, linux-pm

On Tuesday, October 3, 2017 9:41:23 PM CEST Moore, Robert wrote:
> 
> > -----Original Message-----
> > From: rjwysocki@gmail.com [mailto:rjwysocki@gmail.com] On Behalf Of
> > Rafael J. Wysocki
> > Sent: Tuesday, October 3, 2017 11:21 AM
> > To: Moore, Robert <robert.moore@intel.com>
> > Cc: Rafael J. Wysocki <rjw@rjwysocki.net>; Zheng, Lv
> > <lv.zheng@intel.com>; Wu, Fengguang <fengguang.wu@intel.com>; kbuild-
> > all@01.org; linux-acpi@vger.kernel.org; devel@acpica.org; linux-
> > pm@vger.kernel.org
> > 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@intel.com>
> > wrote:
> > >
> > >
> > >> -----Original Message-----
> > >> From: Rafael J. Wysocki [mailto:rjw@rjwysocki.net]
> > >> Sent: Tuesday, October 3, 2017 4:32 AM
> > >> To: Moore, Robert <robert.moore@intel.com>; Zheng, Lv
> > >> <lv.zheng@intel.com>
> > >> Cc: Wu, Fengguang <fengguang.wu@intel.com>; kbuild-all@01.org; linux-
> > >> acpi@vger.kernel.org; devel@acpica.org; linux-pm@vger.kernel.org
> > >> 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.

Thanks,
Rafael


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

* Re: [Devel] [pm:bleeding-edge 12/41] utstrsuppt.c:undefined reference to `__udivdi3'
@ 2017-10-03 20:50           ` Rafael J. Wysocki
  0 siblings, 0 replies; 22+ messages in thread
From: Rafael J. Wysocki @ 2017-10-03 20:50 UTC (permalink / raw)
  To: devel

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

On Tuesday, October 3, 2017 9:41:23 PM CEST Moore, Robert wrote:
> 
> > -----Original Message-----
> > From: rjwysocki(a)gmail.com [mailto:rjwysocki(a)gmail.com] On Behalf Of
> > Rafael J. Wysocki
> > Sent: Tuesday, October 3, 2017 11:21 AM
> > To: Moore, Robert <robert.moore(a)intel.com>
> > Cc: Rafael J. Wysocki <rjw(a)rjwysocki.net>; Zheng, Lv
> > <lv.zheng(a)intel.com>; Wu, Fengguang <fengguang.wu(a)intel.com>; kbuild-
> > all(a)01.org; linux-acpi(a)vger.kernel.org; devel(a)acpica.org; linux-
> > pm(a)vger.kernel.org
> > 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(a)intel.com>
> > wrote:
> > >
> > >
> > >> -----Original Message-----
> > >> From: Rafael J. Wysocki [mailto:rjw(a)rjwysocki.net]
> > >> Sent: Tuesday, October 3, 2017 4:32 AM
> > >> To: Moore, Robert <robert.moore(a)intel.com>; Zheng, Lv
> > >> <lv.zheng(a)intel.com>
> > >> Cc: Wu, Fengguang <fengguang.wu(a)intel.com>; kbuild-all(a)01.org; linux-
> > >> acpi(a)vger.kernel.org; devel(a)acpica.org; linux-pm(a)vger.kernel.org
> > >> 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.

Thanks,
Rafael


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

* Re: [pm:bleeding-edge 12/41] utstrsuppt.c:undefined reference to `__udivdi3'
@ 2017-10-03 21:07             ` Rafael J. Wysocki
  0 siblings, 0 replies; 22+ messages in thread
From: Rafael J. Wysocki @ 2017-10-03 21:07 UTC (permalink / raw)
  To: Moore, Robert
  Cc: Rafael J. Wysocki, Zheng, Lv, Wu, Fengguang, kbuild-all,
	linux-acpi, devel, linux-pm

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@gmail.com [mailto:rjwysocki@gmail.com] On Behalf Of
> > > Rafael J. Wysocki
> > > Sent: Tuesday, October 3, 2017 11:21 AM
> > > To: Moore, Robert <robert.moore@intel.com>
> > > Cc: Rafael J. Wysocki <rjw@rjwysocki.net>; Zheng, Lv
> > > <lv.zheng@intel.com>; Wu, Fengguang <fengguang.wu@intel.com>; kbuild-
> > > all@01.org; linux-acpi@vger.kernel.org; devel@acpica.org; linux-
> > > pm@vger.kernel.org
> > > 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@intel.com>
> > > wrote:
> > > >
> > > >
> > > >> -----Original Message-----
> > > >> From: Rafael J. Wysocki [mailto:rjw@rjwysocki.net]
> > > >> Sent: Tuesday, October 3, 2017 4:32 AM
> > > >> To: Moore, Robert <robert.moore@intel.com>; Zheng, Lv
> > > >> <lv.zheng@intel.com>
> > > >> Cc: Wu, Fengguang <fengguang.wu@intel.com>; kbuild-all@01.org; linux-
> > > >> acpi@vger.kernel.org; devel@acpica.org; linux-pm@vger.kernel.org
> > > >> 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.

Thanks,
Rafael


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

* Re: [Devel] [pm:bleeding-edge 12/41] utstrsuppt.c:undefined reference to `__udivdi3'
@ 2017-10-03 21:07             ` Rafael J. Wysocki
  0 siblings, 0 replies; 22+ messages in thread
From: Rafael J. Wysocki @ 2017-10-03 21:07 UTC (permalink / raw)
  To: devel

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

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(a)gmail.com [mailto:rjwysocki(a)gmail.com] On Behalf Of
> > > Rafael J. Wysocki
> > > Sent: Tuesday, October 3, 2017 11:21 AM
> > > To: Moore, Robert <robert.moore(a)intel.com>
> > > Cc: Rafael J. Wysocki <rjw(a)rjwysocki.net>; Zheng, Lv
> > > <lv.zheng(a)intel.com>; Wu, Fengguang <fengguang.wu(a)intel.com>; kbuild-
> > > all(a)01.org; linux-acpi(a)vger.kernel.org; devel(a)acpica.org; linux-
> > > pm(a)vger.kernel.org
> > > 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(a)intel.com>
> > > wrote:
> > > >
> > > >
> > > >> -----Original Message-----
> > > >> From: Rafael J. Wysocki [mailto:rjw(a)rjwysocki.net]
> > > >> Sent: Tuesday, October 3, 2017 4:32 AM
> > > >> To: Moore, Robert <robert.moore(a)intel.com>; Zheng, Lv
> > > >> <lv.zheng(a)intel.com>
> > > >> Cc: Wu, Fengguang <fengguang.wu(a)intel.com>; kbuild-all(a)01.org; linux-
> > > >> acpi(a)vger.kernel.org; devel(a)acpica.org; linux-pm(a)vger.kernel.org
> > > >> 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.

Thanks,
Rafael


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

* Re: [pm:bleeding-edge 12/41] utstrsuppt.c:undefined reference to `__udivdi3'
@ 2017-10-03 21:17                 ` Rafael J. Wysocki
  0 siblings, 0 replies; 22+ messages in thread
From: Rafael J. Wysocki @ 2017-10-03 21:17 UTC (permalink / raw)
  To: Moore, Robert
  Cc: Rafael J. Wysocki, Zheng, Lv, Wu, Fengguang, kbuild-all,
	linux-acpi, devel, linux-pm

On Tuesday, October 3, 2017 11:23:36 PM CEST Moore, Robert wrote:
> 
> > -----Original Message-----
> > From: Rafael J. Wysocki [mailto:rjw@rjwysocki.net]
> > Sent: Tuesday, October 3, 2017 2:07 PM
> > To: Moore, Robert <robert.moore@intel.com>
> > Cc: Rafael J. Wysocki <rafael@kernel.org>; Zheng, Lv
> > <lv.zheng@intel.com>; Wu, Fengguang <fengguang.wu@intel.com>; kbuild-
> > all@01.org; linux-acpi@vger.kernel.org; devel@acpica.org; linux-
> > pm@vger.kernel.org
> > 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@gmail.com [mailto:rjwysocki@gmail.com] On Behalf
> > > > > Of Rafael J. Wysocki
> > > > > Sent: Tuesday, October 3, 2017 11:21 AM
> > > > > To: Moore, Robert <robert.moore@intel.com>
> > > > > Cc: Rafael J. Wysocki <rjw@rjwysocki.net>; Zheng, Lv
> > > > > <lv.zheng@intel.com>; Wu, Fengguang <fengguang.wu@intel.com>;
> > > > > kbuild- all@01.org; linux-acpi@vger.kernel.org; devel@acpica.org;
> > > > > linux- pm@vger.kernel.org
> > > > > 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@intel.com>
> > > > > wrote:
> > > > > >
> > > > > >
> > > > > >> -----Original Message-----
> > > > > >> From: Rafael J. Wysocki [mailto:rjw@rjwysocki.net]
> > > > > >> Sent: Tuesday, October 3, 2017 4:32 AM
> > > > > >> To: Moore, Robert <robert.moore@intel.com>; Zheng, Lv
> > > > > >> <lv.zheng@intel.com>
> > > > > >> Cc: Wu, Fengguang <fengguang.wu@intel.com>; kbuild-all@01.org;
> > > > > >> linux- acpi@vger.kernel.org; devel@acpica.org;
> > > > > >> linux-pm@vger.kernel.org
> > > > > >> 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. :-)


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

* Re: [Devel] [pm:bleeding-edge 12/41] utstrsuppt.c:undefined reference to `__udivdi3'
@ 2017-10-03 21:17                 ` Rafael J. Wysocki
  0 siblings, 0 replies; 22+ messages in thread
From: Rafael J. Wysocki @ 2017-10-03 21:17 UTC (permalink / raw)
  To: devel

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

On Tuesday, October 3, 2017 11:23:36 PM CEST Moore, Robert wrote:
> 
> > -----Original Message-----
> > From: Rafael J. Wysocki [mailto:rjw(a)rjwysocki.net]
> > Sent: Tuesday, October 3, 2017 2:07 PM
> > To: Moore, Robert <robert.moore(a)intel.com>
> > Cc: Rafael J. Wysocki <rafael(a)kernel.org>; Zheng, Lv
> > <lv.zheng(a)intel.com>; Wu, Fengguang <fengguang.wu(a)intel.com>; kbuild-
> > all(a)01.org; linux-acpi(a)vger.kernel.org; devel(a)acpica.org; linux-
> > pm(a)vger.kernel.org
> > 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(a)gmail.com [mailto:rjwysocki(a)gmail.com] On Behalf
> > > > > Of Rafael J. Wysocki
> > > > > Sent: Tuesday, October 3, 2017 11:21 AM
> > > > > To: Moore, Robert <robert.moore(a)intel.com>
> > > > > Cc: Rafael J. Wysocki <rjw(a)rjwysocki.net>; Zheng, Lv
> > > > > <lv.zheng(a)intel.com>; Wu, Fengguang <fengguang.wu(a)intel.com>;
> > > > > kbuild- all(a)01.org; linux-acpi(a)vger.kernel.org; devel(a)acpica.org;
> > > > > linux- pm(a)vger.kernel.org
> > > > > 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(a)intel.com>
> > > > > wrote:
> > > > > >
> > > > > >
> > > > > >> -----Original Message-----
> > > > > >> From: Rafael J. Wysocki [mailto:rjw(a)rjwysocki.net]
> > > > > >> Sent: Tuesday, October 3, 2017 4:32 AM
> > > > > >> To: Moore, Robert <robert.moore(a)intel.com>; Zheng, Lv
> > > > > >> <lv.zheng(a)intel.com>
> > > > > >> Cc: Wu, Fengguang <fengguang.wu(a)intel.com>; kbuild-all(a)01.org;
> > > > > >> linux- acpi(a)vger.kernel.org; devel(a)acpica.org;
> > > > > >> linux-pm(a)vger.kernel.org
> > > > > >> 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. :-)


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

* RE: [pm:bleeding-edge 12/41] utstrsuppt.c:undefined reference to `__udivdi3'
@ 2017-10-03 21:23               ` Moore, Robert
  0 siblings, 0 replies; 22+ messages in thread
From: Moore, Robert @ 2017-10-03 21:23 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Rafael J. Wysocki, Zheng, Lv, Wu, Fengguang, kbuild-all,
	linux-acpi, devel, linux-pm



> -----Original Message-----
> From: Rafael J. Wysocki [mailto:rjw@rjwysocki.net]
> Sent: Tuesday, October 3, 2017 2:07 PM
> To: Moore, Robert <robert.moore@intel.com>
> Cc: Rafael J. Wysocki <rafael@kernel.org>; Zheng, Lv
> <lv.zheng@intel.com>; Wu, Fengguang <fengguang.wu@intel.com>; kbuild-
> all@01.org; linux-acpi@vger.kernel.org; devel@acpica.org; linux-
> pm@vger.kernel.org
> 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@gmail.com [mailto:rjwysocki@gmail.com] On Behalf
> > > > Of Rafael J. Wysocki
> > > > Sent: Tuesday, October 3, 2017 11:21 AM
> > > > To: Moore, Robert <robert.moore@intel.com>
> > > > Cc: Rafael J. Wysocki <rjw@rjwysocki.net>; Zheng, Lv
> > > > <lv.zheng@intel.com>; Wu, Fengguang <fengguang.wu@intel.com>;
> > > > kbuild- all@01.org; linux-acpi@vger.kernel.org; devel@acpica.org;
> > > > linux- pm@vger.kernel.org
> > > > 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@intel.com>
> > > > wrote:
> > > > >
> > > > >
> > > > >> -----Original Message-----
> > > > >> From: Rafael J. Wysocki [mailto:rjw@rjwysocki.net]
> > > > >> Sent: Tuesday, October 3, 2017 4:32 AM
> > > > >> To: Moore, Robert <robert.moore@intel.com>; Zheng, Lv
> > > > >> <lv.zheng@intel.com>
> > > > >> Cc: Wu, Fengguang <fengguang.wu@intel.com>; kbuild-all@01.org;
> > > > >> linux- acpi@vger.kernel.org; devel@acpica.org;
> > > > >> linux-pm@vger.kernel.org
> > > > >> 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.


> Thanks,
> Rafael

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

* Re: [Devel] [pm:bleeding-edge 12/41] utstrsuppt.c:undefined reference to `__udivdi3'
@ 2017-10-03 21:23               ` Moore, Robert
  0 siblings, 0 replies; 22+ messages in thread
From: Moore, Robert @ 2017-10-03 21:23 UTC (permalink / raw)
  To: devel

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



> -----Original Message-----
> From: Rafael J. Wysocki [mailto:rjw(a)rjwysocki.net]
> Sent: Tuesday, October 3, 2017 2:07 PM
> To: Moore, Robert <robert.moore(a)intel.com>
> Cc: Rafael J. Wysocki <rafael(a)kernel.org>; Zheng, Lv
> <lv.zheng(a)intel.com>; Wu, Fengguang <fengguang.wu(a)intel.com>; kbuild-
> all(a)01.org; linux-acpi(a)vger.kernel.org; devel(a)acpica.org; linux-
> pm(a)vger.kernel.org
> 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(a)gmail.com [mailto:rjwysocki(a)gmail.com] On Behalf
> > > > Of Rafael J. Wysocki
> > > > Sent: Tuesday, October 3, 2017 11:21 AM
> > > > To: Moore, Robert <robert.moore(a)intel.com>
> > > > Cc: Rafael J. Wysocki <rjw(a)rjwysocki.net>; Zheng, Lv
> > > > <lv.zheng(a)intel.com>; Wu, Fengguang <fengguang.wu(a)intel.com>;
> > > > kbuild- all(a)01.org; linux-acpi(a)vger.kernel.org; devel(a)acpica.org;
> > > > linux- pm(a)vger.kernel.org
> > > > 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(a)intel.com>
> > > > wrote:
> > > > >
> > > > >
> > > > >> -----Original Message-----
> > > > >> From: Rafael J. Wysocki [mailto:rjw(a)rjwysocki.net]
> > > > >> Sent: Tuesday, October 3, 2017 4:32 AM
> > > > >> To: Moore, Robert <robert.moore(a)intel.com>; Zheng, Lv
> > > > >> <lv.zheng(a)intel.com>
> > > > >> Cc: Wu, Fengguang <fengguang.wu(a)intel.com>; kbuild-all(a)01.org;
> > > > >> linux- acpi(a)vger.kernel.org; devel(a)acpica.org;
> > > > >> linux-pm(a)vger.kernel.org
> > > > >> 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.


> Thanks,
> Rafael


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

* RE: [pm:bleeding-edge 12/41] utstrsuppt.c:undefined reference to `__udivdi3'
@ 2017-10-03 21:44                   ` Moore, Robert
  0 siblings, 0 replies; 22+ messages in thread
From: Moore, Robert @ 2017-10-03 21:44 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Rafael J. Wysocki, Zheng, Lv, Wu, Fengguang, kbuild-all,
	linux-acpi, devel, linux-pm



> -----Original Message-----
> From: Rafael J. Wysocki [mailto:rjw@rjwysocki.net]
> Sent: Tuesday, October 3, 2017 2:18 PM
> To: Moore, Robert <robert.moore@intel.com>
> Cc: Rafael J. Wysocki <rafael@kernel.org>; Zheng, Lv
> <lv.zheng@intel.com>; Wu, Fengguang <fengguang.wu@intel.com>; kbuild-
> all@01.org; linux-acpi@vger.kernel.org; devel@acpica.org; linux-
> pm@vger.kernel.org
> 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@rjwysocki.net]
> > > Sent: Tuesday, October 3, 2017 2:07 PM
> > > To: Moore, Robert <robert.moore@intel.com>
> > > Cc: Rafael J. Wysocki <rafael@kernel.org>; Zheng, Lv
> > > <lv.zheng@intel.com>; Wu, Fengguang <fengguang.wu@intel.com>;
> > > kbuild- all@01.org; linux-acpi@vger.kernel.org; devel@acpica.org;
> > > linux- pm@vger.kernel.org
> > > 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@gmail.com [mailto:rjwysocki@gmail.com] On
> > > > > > Behalf Of Rafael J. Wysocki
> > > > > > Sent: Tuesday, October 3, 2017 11:21 AM
> > > > > > To: Moore, Robert <robert.moore@intel.com>
> > > > > > Cc: Rafael J. Wysocki <rjw@rjwysocki.net>; Zheng, Lv
> > > > > > <lv.zheng@intel.com>; Wu, Fengguang <fengguang.wu@intel.com>;
> > > > > > kbuild- all@01.org; linux-acpi@vger.kernel.org;
> > > > > > devel@acpica.org;
> > > > > > linux- pm@vger.kernel.org
> > > > > > 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@intel.com>
> > > > > > wrote:
> > > > > > >
> > > > > > >
> > > > > > >> -----Original Message-----
> > > > > > >> From: Rafael J. Wysocki [mailto:rjw@rjwysocki.net]
> > > > > > >> Sent: Tuesday, October 3, 2017 4:32 AM
> > > > > > >> To: Moore, Robert <robert.moore@intel.com>; Zheng, Lv
> > > > > > >> <lv.zheng@intel.com>
> > > > > > >> Cc: Wu, Fengguang <fengguang.wu@intel.com>;
> > > > > > >> kbuild-all@01.org;
> > > > > > >> linux- acpi@vger.kernel.org; devel@acpica.org;
> > > > > > >> linux-pm@vger.kernel.org
> > > > > > >> 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);
    }

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

* Re: [Devel] [pm:bleeding-edge 12/41] utstrsuppt.c:undefined reference to `__udivdi3'
@ 2017-10-03 21:44                   ` Moore, Robert
  0 siblings, 0 replies; 22+ messages in thread
From: Moore, Robert @ 2017-10-03 21:44 UTC (permalink / raw)
  To: devel

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



> -----Original Message-----
> From: Rafael J. Wysocki [mailto:rjw(a)rjwysocki.net]
> Sent: Tuesday, October 3, 2017 2:18 PM
> To: Moore, Robert <robert.moore(a)intel.com>
> Cc: Rafael J. Wysocki <rafael(a)kernel.org>; Zheng, Lv
> <lv.zheng(a)intel.com>; Wu, Fengguang <fengguang.wu(a)intel.com>; kbuild-
> all(a)01.org; linux-acpi(a)vger.kernel.org; devel(a)acpica.org; linux-
> pm(a)vger.kernel.org
> 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(a)rjwysocki.net]
> > > Sent: Tuesday, October 3, 2017 2:07 PM
> > > To: Moore, Robert <robert.moore(a)intel.com>
> > > Cc: Rafael J. Wysocki <rafael(a)kernel.org>; Zheng, Lv
> > > <lv.zheng(a)intel.com>; Wu, Fengguang <fengguang.wu(a)intel.com>;
> > > kbuild- all(a)01.org; linux-acpi(a)vger.kernel.org; devel(a)acpica.org;
> > > linux- pm(a)vger.kernel.org
> > > 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(a)gmail.com [mailto:rjwysocki(a)gmail.com] On
> > > > > > Behalf Of Rafael J. Wysocki
> > > > > > Sent: Tuesday, October 3, 2017 11:21 AM
> > > > > > To: Moore, Robert <robert.moore(a)intel.com>
> > > > > > Cc: Rafael J. Wysocki <rjw(a)rjwysocki.net>; Zheng, Lv
> > > > > > <lv.zheng(a)intel.com>; Wu, Fengguang <fengguang.wu(a)intel.com>;
> > > > > > kbuild- all(a)01.org; linux-acpi(a)vger.kernel.org;
> > > > > > devel(a)acpica.org;
> > > > > > linux- pm(a)vger.kernel.org
> > > > > > 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(a)intel.com>
> > > > > > wrote:
> > > > > > >
> > > > > > >
> > > > > > >> -----Original Message-----
> > > > > > >> From: Rafael J. Wysocki [mailto:rjw(a)rjwysocki.net]
> > > > > > >> Sent: Tuesday, October 3, 2017 4:32 AM
> > > > > > >> To: Moore, Robert <robert.moore(a)intel.com>; Zheng, Lv
> > > > > > >> <lv.zheng(a)intel.com>
> > > > > > >> Cc: Wu, Fengguang <fengguang.wu(a)intel.com>;
> > > > > > >> kbuild-all(a)01.org;
> > > > > > >> linux- acpi(a)vger.kernel.org; devel(a)acpica.org;
> > > > > > >> linux-pm(a)vger.kernel.org
> > > > > > >> 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);
    }

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

* Re: [pm:bleeding-edge 12/41] utstrsuppt.c:undefined reference to `__udivdi3'
@ 2017-10-03 23:44                     ` Rafael J. Wysocki
  0 siblings, 0 replies; 22+ messages in thread
From: Rafael J. Wysocki @ 2017-10-03 23:44 UTC (permalink / raw)
  To: Moore, Robert
  Cc: Rafael J. Wysocki, Zheng, Lv, Wu, Fengguang, kbuild-all,
	linux-acpi, devel, linux-pm

On Tuesday, October 3, 2017 11:44:38 PM CEST Moore, Robert wrote:
> 
> > -----Original Message-----
> > From: Rafael J. Wysocki [mailto:rjw@rjwysocki.net]
> > Sent: Tuesday, October 3, 2017 2:18 PM
> > To: Moore, Robert <robert.moore@intel.com>
> > Cc: Rafael J. Wysocki <rafael@kernel.org>; Zheng, Lv
> > <lv.zheng@intel.com>; Wu, Fengguang <fengguang.wu@intel.com>; kbuild-
> > all@01.org; linux-acpi@vger.kernel.org; devel@acpica.org; linux-
> > pm@vger.kernel.org
> > 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@rjwysocki.net]
> > > > Sent: Tuesday, October 3, 2017 2:07 PM
> > > > To: Moore, Robert <robert.moore@intel.com>
> > > > Cc: Rafael J. Wysocki <rafael@kernel.org>; Zheng, Lv
> > > > <lv.zheng@intel.com>; Wu, Fengguang <fengguang.wu@intel.com>;
> > > > kbuild- all@01.org; linux-acpi@vger.kernel.org; devel@acpica.org;
> > > > linux- pm@vger.kernel.org
> > > > 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@gmail.com [mailto:rjwysocki@gmail.com] On
> > > > > > > Behalf Of Rafael J. Wysocki
> > > > > > > Sent: Tuesday, October 3, 2017 11:21 AM
> > > > > > > To: Moore, Robert <robert.moore@intel.com>
> > > > > > > Cc: Rafael J. Wysocki <rjw@rjwysocki.net>; Zheng, Lv
> > > > > > > <lv.zheng@intel.com>; Wu, Fengguang <fengguang.wu@intel.com>;
> > > > > > > kbuild- all@01.org; linux-acpi@vger.kernel.org;
> > > > > > > devel@acpica.org;
> > > > > > > linux- pm@vger.kernel.org
> > > > > > > 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@intel.com>
> > > > > > > wrote:
> > > > > > > >
> > > > > > > >
> > > > > > > >> -----Original Message-----
> > > > > > > >> From: Rafael J. Wysocki [mailto:rjw@rjwysocki.net]
> > > > > > > >> Sent: Tuesday, October 3, 2017 4:32 AM
> > > > > > > >> To: Moore, Robert <robert.moore@intel.com>; Zheng, Lv
> > > > > > > >> <lv.zheng@intel.com>
> > > > > > > >> Cc: Wu, Fengguang <fengguang.wu@intel.com>;
> > > > > > > >> kbuild-all@01.org;
> > > > > > > >> linux- acpi@vger.kernel.org; devel@acpica.org;
> > > > > > > >> linux-pm@vger.kernel.org
> > > > > > > >> 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.


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

* Re: [Devel] [pm:bleeding-edge 12/41] utstrsuppt.c:undefined reference to `__udivdi3'
@ 2017-10-03 23:44                     ` Rafael J. Wysocki
  0 siblings, 0 replies; 22+ messages in thread
From: Rafael J. Wysocki @ 2017-10-03 23:44 UTC (permalink / raw)
  To: devel

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

On Tuesday, October 3, 2017 11:44:38 PM CEST Moore, Robert wrote:
> 
> > -----Original Message-----
> > From: Rafael J. Wysocki [mailto:rjw(a)rjwysocki.net]
> > Sent: Tuesday, October 3, 2017 2:18 PM
> > To: Moore, Robert <robert.moore(a)intel.com>
> > Cc: Rafael J. Wysocki <rafael(a)kernel.org>; Zheng, Lv
> > <lv.zheng(a)intel.com>; Wu, Fengguang <fengguang.wu(a)intel.com>; kbuild-
> > all(a)01.org; linux-acpi(a)vger.kernel.org; devel(a)acpica.org; linux-
> > pm(a)vger.kernel.org
> > 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(a)rjwysocki.net]
> > > > Sent: Tuesday, October 3, 2017 2:07 PM
> > > > To: Moore, Robert <robert.moore(a)intel.com>
> > > > Cc: Rafael J. Wysocki <rafael(a)kernel.org>; Zheng, Lv
> > > > <lv.zheng(a)intel.com>; Wu, Fengguang <fengguang.wu(a)intel.com>;
> > > > kbuild- all(a)01.org; linux-acpi(a)vger.kernel.org; devel(a)acpica.org;
> > > > linux- pm(a)vger.kernel.org
> > > > 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(a)gmail.com [mailto:rjwysocki(a)gmail.com] On
> > > > > > > Behalf Of Rafael J. Wysocki
> > > > > > > Sent: Tuesday, October 3, 2017 11:21 AM
> > > > > > > To: Moore, Robert <robert.moore(a)intel.com>
> > > > > > > Cc: Rafael J. Wysocki <rjw(a)rjwysocki.net>; Zheng, Lv
> > > > > > > <lv.zheng(a)intel.com>; Wu, Fengguang <fengguang.wu(a)intel.com>;
> > > > > > > kbuild- all(a)01.org; linux-acpi(a)vger.kernel.org;
> > > > > > > devel(a)acpica.org;
> > > > > > > linux- pm(a)vger.kernel.org
> > > > > > > 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(a)intel.com>
> > > > > > > wrote:
> > > > > > > >
> > > > > > > >
> > > > > > > >> -----Original Message-----
> > > > > > > >> From: Rafael J. Wysocki [mailto:rjw(a)rjwysocki.net]
> > > > > > > >> Sent: Tuesday, October 3, 2017 4:32 AM
> > > > > > > >> To: Moore, Robert <robert.moore(a)intel.com>; Zheng, Lv
> > > > > > > >> <lv.zheng(a)intel.com>
> > > > > > > >> Cc: Wu, Fengguang <fengguang.wu(a)intel.com>;
> > > > > > > >> kbuild-all(a)01.org;
> > > > > > > >> linux- acpi(a)vger.kernel.org; devel(a)acpica.org;
> > > > > > > >> linux-pm(a)vger.kernel.org
> > > > > > > >> 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.


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

end of thread, other threads:[~2017-10-03 23:54 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-03  2:25 [pm:bleeding-edge 12/41] utstrsuppt.c:undefined reference to `__udivdi3' kbuild test robot
2017-10-03  2:25 ` [Devel] " kbuild test robot
2017-10-03 11:31 ` Rafael J. Wysocki
2017-10-03 11:31   ` [Devel] " Rafael J. Wysocki
2017-10-03 16:43   ` Moore, Robert
2017-10-03 16:43     ` [Devel] " Moore, Robert
2017-10-03 18:21     ` Rafael J. Wysocki
2017-10-03 18:21       ` [Devel] " Rafael J. Wysocki
2017-10-03 19:41       ` Moore, Robert
2017-10-03 19:41         ` [Devel] " Moore, Robert
2017-10-03 20:50         ` Rafael J. Wysocki
2017-10-03 20:50           ` [Devel] " Rafael J. Wysocki
2017-10-03 21:07           ` Rafael J. Wysocki
2017-10-03 21:07             ` [Devel] " Rafael J. Wysocki
2017-10-03 21:23             ` Moore, Robert
2017-10-03 21:23               ` [Devel] " Moore, Robert
2017-10-03 21:17               ` Rafael J. Wysocki
2017-10-03 21:17                 ` [Devel] " Rafael J. Wysocki
2017-10-03 21:44                 ` Moore, Robert
2017-10-03 21:44                   ` [Devel] " Moore, Robert
2017-10-03 23:44                   ` Rafael J. Wysocki
2017-10-03 23:44                     ` [Devel] " Rafael J. Wysocki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.