From: "Tobin C. Harding" <me@tobin.cc>
To: linuxppc-dev@lists.ozlabs.org
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Michael Ellerman <mpe@ellerman.id.au>
Subject: PowerPC build fail
Date: Wed, 22 Feb 2017 12:22:52 +1100 [thread overview]
Message-ID: <20170222012252.GD6131@eros> (raw)
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]);
^
$ 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.
diff --git a/arch/powerpc/include/asm/cputime.h b/arch/powerpc/include/asm/cputime.h
index 99b5418..15482cb 100644
--- a/arch/powerpc/include/asm/cputime.h
+++ b/arch/powerpc/include/asm/cputime.h
@@ -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 */
diff --git a/include/linux/cputime.h b/include/linux/cputime.h
index a691dc4..f730c14 100644
--- a/include/linux/cputime.h
+++ b/include/linux/cputime.h
@@ -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.
next reply other threads:[~2017-02-22 1:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-22 1:22 Tobin C. Harding [this message]
2017-02-22 2:46 ` PowerPC build fail Andrew Donnellan
2017-02-27 10:38 ` Michael Ellerman
2017-02-27 20:04 ` Tobin C. Harding
2017-02-28 3:42 ` Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170222012252.GD6131@eros \
--to=me@tobin.cc \
--cc=benh@kernel.crashing.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).