* [peterz-queue:sched/core 4/9] arch/x86/kernel/smpboot.c:2083: undefined reference to `__udivdi3'
@ 2020-05-15 22:11 kbuild test robot
2020-05-18 9:35 ` Peter Zijlstra
0 siblings, 1 reply; 6+ messages in thread
From: kbuild test robot @ 2020-05-15 22:11 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 1744 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/core
head: 073d35d51f30267ccb43479be42d382f9b03fd9a
commit: df24fd8a5838c3e24dc7a41b37c5812cce80dd43 [4/9] x86, sched: Prevent divisions by zero in frequency invariant accounting
config: i386-randconfig-a011-20200515 (attached as .config)
compiler: gcc-4.9 (Ubuntu 4.9.3-13ubuntu2) 4.9.3
reproduce:
git checkout df24fd8a5838c3e24dc7a41b37c5812cce80dd43
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
All errors (new ones prefixed by >>, old ones prefixed by <<):
ld: arch/x86/kernel/smpboot.o: in function `arch_scale_freq_tick':
>> arch/x86/kernel/smpboot.c:2083: undefined reference to `__udivdi3'
vim +2083 arch/x86/kernel/smpboot.c
2061
2062 void arch_scale_freq_tick(void)
2063 {
2064 u64 freq_scale = SCHED_CAPACITY_SCALE;
2065 u64 aperf, mperf;
2066 u64 acnt, mcnt;
2067
2068 if (!arch_scale_freq_invariant())
2069 return;
2070
2071 rdmsrl(MSR_IA32_APERF, aperf);
2072 rdmsrl(MSR_IA32_MPERF, mperf);
2073
2074 acnt = aperf - this_cpu_read(arch_prev_aperf);
2075 mcnt = mperf - this_cpu_read(arch_prev_mperf);
2076
2077 this_cpu_write(arch_prev_aperf, aperf);
2078 this_cpu_write(arch_prev_mperf, mperf);
2079
2080 if (check_shl_overflow(acnt, 2*SCHED_CAPACITY_SHIFT, &acnt))
2081 goto error;
2082
> 2083 if (check_mul_overflow(mcnt, arch_max_freq_ratio, &mcnt) || !mcnt)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 34724 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [peterz-queue:sched/core 4/9] arch/x86/kernel/smpboot.c:2083: undefined reference to `__udivdi3'
2020-05-15 22:11 [peterz-queue:sched/core 4/9] arch/x86/kernel/smpboot.c:2083: undefined reference to `__udivdi3' kbuild test robot
@ 2020-05-18 9:35 ` Peter Zijlstra
2020-05-18 10:56 ` Giovanni Gherdovich
0 siblings, 1 reply; 6+ messages in thread
From: Peter Zijlstra @ 2020-05-18 9:35 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 1916 bytes --]
On Sat, May 16, 2020 at 06:11:20AM +0800, kbuild test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/core
> head: 073d35d51f30267ccb43479be42d382f9b03fd9a
> commit: df24fd8a5838c3e24dc7a41b37c5812cce80dd43 [4/9] x86, sched: Prevent divisions by zero in frequency invariant accounting
> config: i386-randconfig-a011-20200515 (attached as .config)
> compiler: gcc-4.9 (Ubuntu 4.9.3-13ubuntu2) 4.9.3
> reproduce:
> git checkout df24fd8a5838c3e24dc7a41b37c5812cce80dd43
> # save the attached .config to linux build tree
> make ARCH=i386
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kbuild test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>, old ones prefixed by <<):
>
> ld: arch/x86/kernel/smpboot.o: in function `arch_scale_freq_tick':
> >> arch/x86/kernel/smpboot.c:2083: undefined reference to `__udivdi3'
>
> vim +2083 arch/x86/kernel/smpboot.c
>
> 2061
> 2062 void arch_scale_freq_tick(void)
> 2063 {
> 2064 u64 freq_scale = SCHED_CAPACITY_SCALE;
> 2065 u64 aperf, mperf;
> 2066 u64 acnt, mcnt;
> 2067
> 2068 if (!arch_scale_freq_invariant())
> 2069 return;
> 2070
> 2071 rdmsrl(MSR_IA32_APERF, aperf);
> 2072 rdmsrl(MSR_IA32_MPERF, mperf);
> 2073
> 2074 acnt = aperf - this_cpu_read(arch_prev_aperf);
> 2075 mcnt = mperf - this_cpu_read(arch_prev_mperf);
> 2076
> 2077 this_cpu_write(arch_prev_aperf, aperf);
> 2078 this_cpu_write(arch_prev_mperf, mperf);
> 2079
> 2080 if (check_shl_overflow(acnt, 2*SCHED_CAPACITY_SHIFT, &acnt))
> 2081 goto error;
> 2082
> > 2083 if (check_mul_overflow(mcnt, arch_max_freq_ratio, &mcnt) || !mcnt)
*sigh*,.. I hate computers. I'll try and have a look later, but if if
you have a nice solution Giovanni, don't hessitate to tell me ;-)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [peterz-queue:sched/core 4/9] arch/x86/kernel/smpboot.c:2083: undefined reference to `__udivdi3'
2020-05-18 9:35 ` Peter Zijlstra
@ 2020-05-18 10:56 ` Giovanni Gherdovich
2020-05-18 13:00 ` Peter Zijlstra
0 siblings, 1 reply; 6+ messages in thread
From: Giovanni Gherdovich @ 2020-05-18 10:56 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2168 bytes --]
On Mon, 2020-05-18 at 11:35 +0200, Peter Zijlstra wrote:
> On Sat, May 16, 2020 at 06:11:20AM +0800, kbuild test robot wrote:
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/core
> > head: 073d35d51f30267ccb43479be42d382f9b03fd9a
> > commit: df24fd8a5838c3e24dc7a41b37c5812cce80dd43 [4/9] x86, sched: Prevent divisions by zero in frequency invariant accounting
> > config: i386-randconfig-a011-20200515 (attached as .config)
> > compiler: gcc-4.9 (Ubuntu 4.9.3-13ubuntu2) 4.9.3
> > reproduce:
> > git checkout df24fd8a5838c3e24dc7a41b37c5812cce80dd43
> > # save the attached .config to linux build tree
> > make ARCH=i386
> >
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kbuild test robot <lkp@intel.com>
> >
> > All errors (new ones prefixed by >>, old ones prefixed by <<):
> >
> > ld: arch/x86/kernel/smpboot.o: in function `arch_scale_freq_tick':
> > > > arch/x86/kernel/smpboot.c:2083: undefined reference to `__udivdi3'
> >
> > vim +2083 arch/x86/kernel/smpboot.c
> >
> > 2061
> > 2062 void arch_scale_freq_tick(void)
> > 2063 {
> > 2064 u64 freq_scale = SCHED_CAPACITY_SCALE;
> > 2065 u64 aperf, mperf;
> > 2066 u64 acnt, mcnt;
> > 2067
> > 2068 if (!arch_scale_freq_invariant())
> > 2069 return;
> > 2070
> > 2071 rdmsrl(MSR_IA32_APERF, aperf);
> > 2072 rdmsrl(MSR_IA32_MPERF, mperf);
> > 2073
> > 2074 acnt = aperf - this_cpu_read(arch_prev_aperf);
> > 2075 mcnt = mperf - this_cpu_read(arch_prev_mperf);
> > 2076
> > 2077 this_cpu_write(arch_prev_aperf, aperf);
> > 2078 this_cpu_write(arch_prev_mperf, mperf);
> > 2079
> > 2080 if (check_shl_overflow(acnt, 2*SCHED_CAPACITY_SHIFT, &acnt))
> > 2081 goto error;
> > 2082
> > > 2083 if (check_mul_overflow(mcnt, arch_max_freq_ratio, &mcnt) || !mcnt)
>
> *sigh*,.. I hate computers. I'll try and have a look later, but if if
> you have a nice solution Giovanni, don't hessitate to tell me ;-)
Hello Peter,
today I'm speaking at OSPM but tomorrow I'll see how to fix this.
Giovanni
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [peterz-queue:sched/core 4/9] arch/x86/kernel/smpboot.c:2083: undefined reference to `__udivdi3'
2020-05-18 10:56 ` Giovanni Gherdovich
@ 2020-05-18 13:00 ` Peter Zijlstra
2020-05-19 16:50 ` Giovanni Gherdovich
0 siblings, 1 reply; 6+ messages in thread
From: Peter Zijlstra @ 2020-05-18 13:00 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2497 bytes --]
On Mon, May 18, 2020 at 12:56:18PM +0200, Giovanni Gherdovich wrote:
> On Mon, 2020-05-18 at 11:35 +0200, Peter Zijlstra wrote:
> > On Sat, May 16, 2020 at 06:11:20AM +0800, kbuild test robot wrote:
> > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/core
> > > head: 073d35d51f30267ccb43479be42d382f9b03fd9a
> > > commit: df24fd8a5838c3e24dc7a41b37c5812cce80dd43 [4/9] x86, sched: Prevent divisions by zero in frequency invariant accounting
> > > config: i386-randconfig-a011-20200515 (attached as .config)
> > > compiler: gcc-4.9 (Ubuntu 4.9.3-13ubuntu2) 4.9.3
> > > reproduce:
> > > git checkout df24fd8a5838c3e24dc7a41b37c5812cce80dd43
> > > # save the attached .config to linux build tree
> > > make ARCH=i386
> > >
> > > If you fix the issue, kindly add following tag as appropriate
> > > Reported-by: kbuild test robot <lkp@intel.com>
> > >
> > > All errors (new ones prefixed by >>, old ones prefixed by <<):
> > >
> > > ld: arch/x86/kernel/smpboot.o: in function `arch_scale_freq_tick':
> > > > > arch/x86/kernel/smpboot.c:2083: undefined reference to `__udivdi3'
> > >
> > > vim +2083 arch/x86/kernel/smpboot.c
> > >
> > > 2061
> > > 2062 void arch_scale_freq_tick(void)
> > > 2063 {
> > > 2064 u64 freq_scale = SCHED_CAPACITY_SCALE;
> > > 2065 u64 aperf, mperf;
> > > 2066 u64 acnt, mcnt;
> > > 2067
> > > 2068 if (!arch_scale_freq_invariant())
> > > 2069 return;
> > > 2070
> > > 2071 rdmsrl(MSR_IA32_APERF, aperf);
> > > 2072 rdmsrl(MSR_IA32_MPERF, mperf);
> > > 2073
> > > 2074 acnt = aperf - this_cpu_read(arch_prev_aperf);
> > > 2075 mcnt = mperf - this_cpu_read(arch_prev_mperf);
> > > 2076
> > > 2077 this_cpu_write(arch_prev_aperf, aperf);
> > > 2078 this_cpu_write(arch_prev_mperf, mperf);
> > > 2079
> > > 2080 if (check_shl_overflow(acnt, 2*SCHED_CAPACITY_SHIFT, &acnt))
> > > 2081 goto error;
> > > 2082
> > > > 2083 if (check_mul_overflow(mcnt, arch_max_freq_ratio, &mcnt) || !mcnt)
> >
> > *sigh*,.. I hate computers. I'll try and have a look later, but if if
> > you have a nice solution Giovanni, don't hessitate to tell me ;-)
>
> Hello Peter,
>
> today I'm speaking at OSPM but tomorrow I'll see how to fix this.
Ha!, yes, I'll be there, listening.. :-)
So far the easiest fix I've come up with is simply limiting all this to
64bit.. like who cares about 32bit anyway :-))))
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [peterz-queue:sched/core 4/9] arch/x86/kernel/smpboot.c:2083: undefined reference to `__udivdi3'
2020-05-18 13:00 ` Peter Zijlstra
@ 2020-05-19 16:50 ` Giovanni Gherdovich
2020-05-19 17:36 ` Peter Zijlstra
0 siblings, 1 reply; 6+ messages in thread
From: Giovanni Gherdovich @ 2020-05-19 16:50 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2866 bytes --]
On Mon, 2020-05-18 at 15:00 +0200, Peter Zijlstra wrote:
> On Mon, May 18, 2020 at 12:56:18PM +0200, Giovanni Gherdovich wrote:
> > On Mon, 2020-05-18 at 11:35 +0200, Peter Zijlstra wrote:
> > > On Sat, May 16, 2020 at 06:11:20AM +0800, kbuild test robot wrote:
> > > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/core
> > > > head: 073d35d51f30267ccb43479be42d382f9b03fd9a
> > > > commit: df24fd8a5838c3e24dc7a41b37c5812cce80dd43 [4/9] x86, sched: Prevent divisions by zero in frequency invariant accounting
> > > > config: i386-randconfig-a011-20200515 (attached as .config)
> > > > compiler: gcc-4.9 (Ubuntu 4.9.3-13ubuntu2) 4.9.3
> > > > reproduce:
> > > > git checkout df24fd8a5838c3e24dc7a41b37c5812cce80dd43
> > > > # save the attached .config to linux build tree
> > > > make ARCH=i386
> > > >
> > > > If you fix the issue, kindly add following tag as appropriate
> > > > Reported-by: kbuild test robot <lkp@intel.com>
> > > >
> > > > All errors (new ones prefixed by >>, old ones prefixed by <<):
> > > >
> > > > ld: arch/x86/kernel/smpboot.o: in function `arch_scale_freq_tick':
> > > > > > arch/x86/kernel/smpboot.c:2083: undefined reference to `__udivdi3'
> > > >
> > > > vim +2083 arch/x86/kernel/smpboot.c
> > > >
> > > > 2061
> > > > 2062 void arch_scale_freq_tick(void)
> > > > 2063 {
> > > > 2064 u64 freq_scale = SCHED_CAPACITY_SCALE;
> > > > 2065 u64 aperf, mperf;
> > > > 2066 u64 acnt, mcnt;
> > > > 2067
> > > > 2068 if (!arch_scale_freq_invariant())
> > > > 2069 return;
> > > > 2070
> > > > 2071 rdmsrl(MSR_IA32_APERF, aperf);
> > > > 2072 rdmsrl(MSR_IA32_MPERF, mperf);
> > > > 2073
> > > > 2074 acnt = aperf - this_cpu_read(arch_prev_aperf);
> > > > 2075 mcnt = mperf - this_cpu_read(arch_prev_mperf);
> > > > 2076
> > > > 2077 this_cpu_write(arch_prev_aperf, aperf);
> > > > 2078 this_cpu_write(arch_prev_mperf, mperf);
> > > > 2079
> > > > 2080 if (check_shl_overflow(acnt, 2*SCHED_CAPACITY_SHIFT, &acnt))
> > > > 2081 goto error;
> > > > 2082
> > > > > 2083 if (check_mul_overflow(mcnt, arch_max_freq_ratio, &mcnt) || !mcnt)
> > >
> > > *sigh*,.. I hate computers. I'll try and have a look later, but if if
> > > you have a nice solution Giovanni, don't hessitate to tell me ;-)
> >
> > Hello Peter,
> >
> > today I'm speaking at OSPM but tomorrow I'll see how to fix this.
>
> Ha!, yes, I'll be there, listening.. :-)
>
> So far the easiest fix I've come up with is simply limiting all this to
> 64bit.. like who cares about 32bit anyway :-))))
Agreed. I don't think APERFMPERF is supported on i386 anyways, and that would
be a requirement for frequency invariance. In any case, support for i386 is
"let's not break it".
Giovanni
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [peterz-queue:sched/core 4/9] arch/x86/kernel/smpboot.c:2083: undefined reference to `__udivdi3'
2020-05-19 16:50 ` Giovanni Gherdovich
@ 2020-05-19 17:36 ` Peter Zijlstra
0 siblings, 0 replies; 6+ messages in thread
From: Peter Zijlstra @ 2020-05-19 17:36 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 715 bytes --]
On Tue, May 19, 2020 at 06:50:00PM +0200, Giovanni Gherdovich wrote:
> On Mon, 2020-05-18 at 15:00 +0200, Peter Zijlstra wrote:
> > So far the easiest fix I've come up with is simply limiting all this to
> > 64bit.. like who cares about 32bit anyway :-))))
>
> Agreed. I don't think APERFMPERF is supported on i386 anyways, and that would
> be a requirement for frequency invariance. In any case, support for i386 is
> "let's not break it".
Well, i386 is mostly a case of people running 32bit kernels on 64bit
capable hardware for $REASON. Which is stupid anyway. There is very few
actual 32bit chips left I think.
But I do think the very last 32bit CPUs did in fact support APERF/MPERF,
but meh.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-05-19 17:36 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-15 22:11 [peterz-queue:sched/core 4/9] arch/x86/kernel/smpboot.c:2083: undefined reference to `__udivdi3' kbuild test robot
2020-05-18 9:35 ` Peter Zijlstra
2020-05-18 10:56 ` Giovanni Gherdovich
2020-05-18 13:00 ` Peter Zijlstra
2020-05-19 16:50 ` Giovanni Gherdovich
2020-05-19 17:36 ` Peter Zijlstra
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.