ppc64 build failure if VIRT_CPU_ACCOUNTING_NATIVE is not enabled

From: Guenter Roeck
Date: Wed Feb 22 2017 - 14:50:34 EST


ppc64 builds fail as follows if VIRT_CPU_ACCOUNTING_NATIVE is disabled.

arch/powerpc/kernel/time.c: In function 'running_clock':
arch/powerpc/kernel/time.c:712:2: error:
implicit declaration of function 'cputime_to_nsecs'

Since commit f22d6df0b23e, cputime_to_nsecs() is only available if
VIRT_CPU_ACCOUNTING_NATIVE is enabled, yet it is used unconditionally
from the ppc code. Bisect log is attached.

Not knowing how to fix the problem, I'll "solve" it in my test builds
by enabling VIRT_CPU_ACCOUNTING_NATIVE, but someone might want to have
a look and fix it for good.


# bad: [7bb033829ef3ecfc491c0ed0197966e8f197fbdc] Merge tag 'rodata-v4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
# good: [c470abd4fde40ea6a0846a2beab642a578c0b8cd] Linux 4.10
git bisect start 'HEAD' 'v4.10'
# bad: [fd4a61e08aa79f2b7835b25c6f94f27bd2d65990] sched/core: Fix build paravirt build on arm and arm64
git bisect bad fd4a61e08aa79f2b7835b25c6f94f27bd2d65990
# bad: [828cad8ea05d194d8a9452e0793261c2024c23a2] Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
git bisect bad 828cad8ea05d194d8a9452e0793261c2024c23a2
# good: [1cd4027cfe33390dc3f442aea8e7caeeeaa861a1] Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
git bisect good 1cd4027cfe33390dc3f442aea8e7caeeeaa861a1
# good: [0c8967c9df230d2c4dde6649f410b62e01806c22] Merge tag 'perf-core-for-mingo-4.11-20170215' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
git bisect good 0c8967c9df230d2c4dde6649f410b62e01806c22
# bad: [004172bdad644327dc7a6543186b9d7b529ee944] sched/core: Remove unnecessary #include headers
git bisect bad 004172bdad644327dc7a6543186b9d7b529ee944
# good: [ed5c8c854f2b990dfa4d85c4995d115768a05d3c] Merge branch 'linus' into sched/core, to pick up fixes and refresh the branch
git bisect good ed5c8c854f2b990dfa4d85c4995d115768a05d3c
# good: [71ea47b197de9a53bc3747a8b1c667df9c6a4c68] sched/cputime: Remove temporary cputime_t accessors
git bisect good 71ea47b197de9a53bc3747a8b1c667df9c6a4c68
# bad: [c833d82df73483c1716243bcd9cb5b6fef94621f] ia64, sched/cputime: Remove unused cputime definitions
git bisect bad c833d82df73483c1716243bcd9cb5b6fef94621f
# good: [2b1f967d80e8e5d7361f0e1654c842869570f573] sched/cputime: Complete nsec conversion of tick based accounting
git bisect good 2b1f967d80e8e5d7361f0e1654c842869570f573
# bad: [f22d6df0b23e66b6d9058e2570402606a6ad069a] sched/cputime: Remove jiffies based cputime
git bisect bad f22d6df0b23e66b6d9058e2570402606a6ad069a
# good: [bfce1d6006f383fbb55a89580af37819a77195b7] sched/cputime, vtime: Return nsecs instead of cputime_t to account
git bisect good bfce1d6006f383fbb55a89580af37819a77195b7
# first bad commit: [f22d6df0b23e66b6d9058e2570402606a6ad069a] sched/cputime: Remove jiffies based cputime