From patchwork Fri Nov 20 14:59:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 7668851 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id BB4BBBF90C for ; Fri, 20 Nov 2015 15:02:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 41FA0203B7 for ; Fri, 20 Nov 2015 15:02:33 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8FC0220439 for ; Fri, 20 Nov 2015 15:02:29 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZznAm-0005Gh-FJ; Fri, 20 Nov 2015 15:00:24 +0000 Received: from smtp02.citrix.com ([66.165.176.63]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZznAX-0003yf-J2 for linux-arm-kernel@lists.infradead.org; Fri, 20 Nov 2015 15:00:10 +0000 X-IronPort-AV: E=Sophos;i="5.20,323,1444694400"; d="scan'208";a="319591109" From: Stefano Stabellini To: Subject: [PATCH v12 2/4] missing include asm/paravirt.h in cputime.c Date: Fri, 20 Nov 2015 14:59:31 +0000 Message-ID: <1448031573-23497-2-git-send-email-stefano.stabellini@eu.citrix.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: MIME-Version: 1.0 X-DLP: MIA2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151120_070009_968710_B21E6CB5 X-CRM114-Status: UNSURE ( 7.45 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -4.8 (----) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux@arm.linux.org.uk, Ian.Campbell@citrix.com, arnd@arndb.de, Stefano Stabellini , marc.zyngier@arm.com, catalin.marinas@arm.com, konrad.wilk@oracle.com, will.deacon@arm.com, linux-kernel@vger.kernel.org, "Peter Zijlstra \(Intel\)" , mingo@redhat.com, olof@lixom.net, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 is missing, is that on x86 asm/paravirt.h is included by one of the other headers included in kernel/sched/cputime.c: #include #include #include #include #include #include #include #include #include On arm and arm64, where I am about to introduce asm/paravirt.h and stolen time support, without #include in cputime.c, I would get an error. Signed-off-by: Stefano Stabellini Acked-by: Peter Zijlstra (Intel) 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 #include #include "sched.h" +#ifdef CONFIG_PARAVIRT +#include +#endif #ifdef CONFIG_IRQ_TIME_ACCOUNTING