From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
To: <xen-devel@lists.xensource.com>
Cc: <linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>, <konrad.wilk@oracle.com>,
<marc.zyngier@arm.com>, <will.deacon@arm.com>,
<Stefano.Stabellini@eu.citrix.com>, <Ian.Campbell@citrix.com>,
<linux@arm.linux.org.uk>, <olof@lixom.net>, <arnd@arndb.de>,
<catalin.marinas@arm.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
"Peter Zijlstra (Intel)" <peterz@infradead.org>,
<mingo@redhat.com>
Subject: [PATCH v12 2/4] missing include asm/paravirt.h in cputime.c
Date: Fri, 20 Nov 2015 14:59:31 +0000 [thread overview]
Message-ID: <1448031573-23497-2-git-send-email-stefano.stabellini@eu.citrix.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1511201434520.1107@kaball.uk.xensource.com>
Add include asm/paravirt.h to cputime.c, as steal_account_process_tick
calls paravirt_steal_clock, which is defined in asm/paravirt.h.
The ifdef CONFIG_PARAVIRT is necessary because not all archs have an
asm/paravirt.h to include.
The reason why currently cputime.c compiles, even though include
<asm/paravirt.h> is missing, is that on x86 asm/paravirt.h is included
by one of the other headers included in kernel/sched/cputime.c:
#include <kernel/sched/sched.h>
#include <linux/spinlock.h>
#include <linux/preempt.h>
#include <asm/preempt.h>
#include <linux/thread_info.h>
#include <asm/thread_info.h>
#include <asm/processor.h>
#include <asm/msr.h>
#include <asm/paravirt.h>
On arm and arm64, where I am about to introduce asm/paravirt.h and
stolen time support, without #include <asm/paravirt.h> in cputime.c, I
would get an error.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
CC: mingo@redhat.com
CC: peterz@infradead.org
---
Changes in v12:
- add more info to the commit message
Changes in v11:
- add ifdef CONFIG_PARAVIRT to cputime.c, because not all architectures
have an asm/paravirt.h header file to include
- drop the removal of ifdef CONFIG_PARAVIRT from kernel/sched/core.c for
the same reason
---
kernel/sched/cputime.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/kernel/sched/cputime.c b/kernel/sched/cputime.c
index 8cbc3db..c7a27c4 100644
--- a/kernel/sched/cputime.c
+++ b/kernel/sched/cputime.c
@@ -5,6 +5,9 @@
#include <linux/static_key.h>
#include <linux/context_tracking.h>
#include "sched.h"
+#ifdef CONFIG_PARAVIRT
+#include <asm/paravirt.h>
+#endif
#ifdef CONFIG_IRQ_TIME_ACCOUNTING
--
1.7.10.4
next prev parent reply other threads:[~2015-11-20 14:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-20 14:58 [PATCH v12 0/4] xen/arm64: CONFIG_PARAVIRT and stolen ticks accounting Stefano Stabellini
2015-11-20 14:59 ` [PATCH v12 1/4] xen: move xen_setup_runstate_info and get_runstate_snapshot to drivers/xen/time.c Stefano Stabellini
2015-11-20 14:59 ` Stefano Stabellini [this message]
2015-11-20 14:59 ` [PATCH v12 3/4] arm64: introduce CONFIG_PARAVIRT, PARAVIRT_TIME_ACCOUNTING and pv_time_ops Stefano Stabellini
2015-11-20 14:59 ` [PATCH v12 4/4] xen/arm: account for stolen ticks Stefano Stabellini
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=1448031573-23497-2-git-send-email-stefano.stabellini@eu.citrix.com \
--to=stefano.stabellini@eu.citrix.com \
--cc=Ian.Campbell@citrix.com \
--cc=arnd@arndb.de \
--cc=catalin.marinas@arm.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=marc.zyngier@arm.com \
--cc=mingo@redhat.com \
--cc=olof@lixom.net \
--cc=peterz@infradead.org \
--cc=will.deacon@arm.com \
--cc=xen-devel@lists.xensource.com \
/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
all inboxes | Powered by JetHome®