From patchwork Wed Feb 20 19:41:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 2168941 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 3EBF1DF230 for ; Wed, 20 Feb 2013 19:44:49 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U8FYJ-0006BG-Ai; Wed, 20 Feb 2013 19:42:03 +0000 Received: from mail-da0-f43.google.com ([209.85.210.43]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1U8FY4-00068V-Lu for linux-arm-kernel@lists.infradead.org; Wed, 20 Feb 2013 19:41:49 +0000 Received: by mail-da0-f43.google.com with SMTP id u36so3737066dak.16 for ; Wed, 20 Feb 2013 11:41:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=N0Nm4oOPgrA4j8jAZFA/0/ArIJZeITxJ+w0ZqvaO+v0=; b=ko/ayQ7rfrPTRYG+abd4QbRflFWzv+Y9cpt8d9RsmijRClAyKZxTNCysgUaA32ByXu cBRhNOS6XdYQc6MzT4IvKz4q2Q1sByvlLQG7QOcjH6bHk15TC4Ddi+f9DE77+ehT5qjx 0PHv5ukKaVnGFFt146nyO0lD/4C4DpgD9+AFJcBnM9vEv7riAOPoQtaH+ptSXQbRz9En 0XzjUPuMFgK5pffe6u1116gh2pvnFU+hlrVt2UI7fGVrWWMwMsF57mX13eAtVXWdmswx J2uc1eB5qAdzFqiZG7JscHqGvNOIoAIcS9LDXpCYeBPlHH0hZg/a61A9iwMEYSsMlVKH gWGQ== X-Received: by 10.68.213.170 with SMTP id nt10mr51316315pbc.14.1361389307296; Wed, 20 Feb 2013 11:41:47 -0800 (PST) Received: from localhost (c-24-19-7-36.hsd1.wa.comcast.net. [24.19.7.36]) by mx.google.com with ESMTPS id qb10sm22571841pbb.43.2013.02.20.11.41.45 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 20 Feb 2013 11:41:46 -0800 (PST) From: Kevin Hilman To: Frederic Weisbecker Subject: [RFC/PATCH 1/5] context tracking: conditionalize guest support based on CONFIG_KVM Date: Wed, 20 Feb 2013 11:41:38 -0800 Message-Id: <1361389302-11968-2-git-send-email-khilman@linaro.org> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1361389302-11968-1-git-send-email-khilman@linaro.org> References: <1361389302-11968-1-git-send-email-khilman@linaro.org> X-Gm-Message-State: ALoCoQnd3I84Q9MDwTcxQASkIef06jRKGRIzDWuHhAO5CChnQnqjMNFokKjfPo+TpFY94Ngu6Pv2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130220_144148_927125_B27CAD2B X-CRM114-Status: UNSURE ( 8.62 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.210.43 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Mats Liljegren , linaro-dev@lists.linaro.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org So that it can build on !KVM systems too. Signed-off-by: Kevin Hilman --- kernel/context_tracking.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel/context_tracking.c b/kernel/context_tracking.c index 74f68f4..6fe96b1 100644 --- a/kernel/context_tracking.c +++ b/kernel/context_tracking.c @@ -1,5 +1,7 @@ #include +#ifdef CONFIG_KVM #include +#endif #include #include #include @@ -62,6 +64,7 @@ void user_exit(void) local_irq_restore(flags); } +#ifdef CONFIG_KVM void guest_enter(void) { if (vtime_accounting_enabled()) @@ -79,6 +82,7 @@ void guest_exit(void) __guest_exit(); } EXPORT_SYMBOL_GPL(guest_exit); +#endif void context_tracking_task_switch(struct task_struct *prev, struct task_struct *next)