PowerPC build fail
The current (2bfe01e) torvalds git tree fails to build on powerpc64. Build machine is virtualized.
- Build errorarch/powerpc/kernel/time.c: In function ‘running_clock’:arch/powerpc/kernel/time.c:712:25: error: implicit declaration of function ‘cputime_to_nsecs’
return local_clock() - cputime_to_nsecs(kcpustat_this_cpu->cpustat[CPUTIME_STEAL]);
^$ cat .config | grep CONFIG_VIRT_CPU # CONFIG_VIRT_CPU_ACCOUNTING_NATIVE is not set # CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set
$ cat .config | grep CONFIG_PPC_PSERIES CONFIG_PPC_PSERIES=y
Looking into it I found there are compile time guards on CONFIG_VIRT_CPU_ACCOUNTING_NATIVE preventing cputime_to_nsecs being defined.
Removing the compile time guard allows the build to proceed, surely this is not the correct solution though.
arch/powerpc/include/asm/cputime.h +1 -2
@@ -16,7 +16,7 @@#ifndef __POWERPC_CPUTIME_H#define __POWERPC_CPUTIME_H -#ifdef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE +#include <linux/types.h> #include <linux/time.h>
@@ -53,5 +53,5 @@ void arch_vtime_task_switch(struct task_struct *tsk);#endif #endif /* __KERNEL__ */ -#endif /* CONFIG_VIRT_CPU_ACCOUNTING_NATIVE */ #endif /* __POWERPC_CPUTIME_H */
include/linux/cputime.h +3 -3
@@ -1,13 +1,13 @@#ifndef __LINUX_CPUTIME_H#define __LINUX_CPUTIME_H -#ifdef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE +#include <asm/cputime.h> #ifndef cputime_to_nsecs -# define cputime_to_nsecs (__ct) \ +#define cputime_to_nsecs (__ct) \ (cputime_to_usecs(__ct) * NSEC_PER_USEC)#endif -#endif /* CONFIG_VIRT_CPU_ACCOUNTING_NATIVE */ +#endif /* __LINUX_CPUTIME_H */
If you think this can be fixed with the *little* kernel dev knowledge I have please point me at a starting place and I will dig into it.
thanks,
Tobin.
Quoted 7 lines · Tobin C. Harding
The current (2bfe01e) torvalds git tree fails to build on powerpc64. Build machine is virtualized.
- Build error
arch/powerpc/kernel/time.c: In function ‘running_clock’:arch/powerpc/kernel/time.c:712:25: error: implicit declaration of function ‘cputime_to_nsecs’
returnlocal_clock()-cputime_to_nsecs(kcpustat_this_cpu->cpustat[CPUTIME_STEAL]);
Already reported, see https://lists.ozlabs.org/pipermail/linuxppc-dev/2017-February/154433.html
See patch at http://patchwork.ozlabs.org/patch/730616/
Andrew
Signature · 2 lines
Andrew Donnellan OzLabs, ADL Canberra [email protected] IBM Australia Limited
Michael Ellerman
reviewerHi Tobin,
Quoted 1 line · Tobin C. Harding
The current (2bfe01e) torvalds git tree fails to build on powerpc64. Buil=
d machine
Quoted 5 lines
is virtualized.
- Build error
arch/powerpc/kernel/time.c: In function =E2=80=98running_clock=E2=80=99:arch/powerpc/kernel/time.c:712:25: error: implicit declaration of functio=
n =E2=80=98cputime_to_nsecs=E2=80=99
Quoted 1 line
return local_clock() - cputime_to_nsecs(kcpustat_this_cpu->cpustat[CPU=
TIME_STEAL]);
Quoted 1 line
^
...
Quoted 3 lines
If you think this can be fixed with the *little* kernel dev knowledge I have please point me at a starting place and I will dig into it.
Thanks for trying to fix it.
You got unlucky and pulled Linus' tree just after a cleanup series was merged, but before all the bugs had been shaken out.
cheers
Quoted 13 lines · Michael Ellerman
Hi Tobin,
Quoted 8 lines · Tobin C. Harding
The current (2bfe01e) torvalds git tree fails to build on powerpc64. Build machine is virtualized.
- Build error
arch/powerpc/kernel/time.c: In function ‘running_clock’:arch/powerpc/kernel/time.c:712:25: error: implicit declaration of function ‘cputime_to_nsecs’return local_clock() - cputime_to_nsecs(kcpustat_this_cpu->cpustat[CPUTIME_STEAL]); ^...
Quoted 1 line
Quoted 7 lines
Quoted 2 lines
If you think this can be fixed with the *little* kernel dev knowledge I have please point me at a starting place and I will dig into it.
Thanks for trying to fix it.
You got unlucky and pulled Linus' tree just after a cleanup series was merged, but before all the bugs had been shaken out.
Au contraire, I felt lucky to have bumped into a bug. I would like to find more :)
Tobin
Michael Ellerman
reviewerQuoted 5 lines · Tobin C. Harding
Quoted 4 lines · Michael Ellerman
Hi Tobin,
=20Quoted 1 line · Tobin C. Harding
The current (2bfe01e) torvalds git tree fails to build on powerpc64. B=
uild machine
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
is virtualized.
- Build error
arch/powerpc/kernel/time.c: In function =E2=80=98running_clock=E2=80=
=99:
Quoted 1 line
Quoted 1 line
Quoted 1 line
arch/powerpc/kernel/time.c:712:25: error: implicit declaration of func=
tion =E2=80=98cputime_to_nsecs=E2=80=99
Quoted 1 line
Quoted 1 line
Quoted 1 line
return local_clock() - cputime_to_nsecs(kcpustat_this_cpu->cpustat[=
CPUTIME_STEAL]);
Quoted 5 lines
Quoted 5 lines
Quoted 1 line
^...
Quoted 3 lines
If you think this can be fixed with the *little* kernel dev knowledge I have please point me at a starting place and I will dig into it.
Quoted 8 lines
Quoted 5 lines
=20
Thanks for trying to fix it.
=20
You got unlucky and pulled Linus' tree just after a cleanup series was merged, but before all the bugs had been shaken out.Au contraire, I felt lucky to have bumped into a bug. I would like to find more :)
Hah, well, we have *plenty* :)
I keep a rough list of TODO/FIXME type things on github:
https://github.com/linuxppc/linux/issues/
If there's anything there that you want to have a go at please feel free. If you have questions you can either comment on the issues or mail me and/or this list.
cheers