From patchwork Wed Aug 10 10:13:41 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot for Dave Martin X-Patchwork-Id: 1052562 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p7AAFSUn029917 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 10 Aug 2011 10:15:49 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Qr5oX-0006ab-Hs; Wed, 10 Aug 2011 10:15:08 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Qr5oK-0002Eb-2d; Wed, 10 Aug 2011 10:14:52 +0000 Received: from mail-ww0-f49.google.com ([74.125.82.49]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Qr5nT-00022W-1f for linux-arm-kernel@lists.infradead.org; Wed, 10 Aug 2011 10:14:00 +0000 Received: by wwf10 with SMTP id 10so647100wwf.18 for ; Wed, 10 Aug 2011 03:13:57 -0700 (PDT) Received: by 10.227.172.73 with SMTP id k9mr6806245wbz.30.1312971237890; Wed, 10 Aug 2011 03:13:57 -0700 (PDT) Received: from e200948.peterhouse.linaro.org (fw-lnat.cambridge.arm.com [217.140.96.63]) by mx.google.com with ESMTPS id fr7sm627419wbb.22.2011.08.10.03.13.56 (version=SSLv3 cipher=OTHER); Wed, 10 Aug 2011 03:13:57 -0700 (PDT) From: Dave Martin To: linux-arm-kernel@lists.infradead.org Subject: [RFC PATCH 3/5] ARM: kprobes: Reference cpu_architecture as a global variable Date: Wed, 10 Aug 2011 11:13:41 +0100 Message-Id: <1312971223-28165-4-git-send-email-dave.martin@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1312971223-28165-1-git-send-email-dave.martin@linaro.org> References: <1312971223-28165-1-git-send-email-dave.martin@linaro.org> X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110810_061359_343650_69F5E34F X-CRM114-Status: GOOD ( 13.75 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.82.49 listed in list.dnswl.org] Cc: Nicolas Pitre , Kukjin Kim , Jon Medhurst , Ben Dooks , patches@linaro.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 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 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Wed, 10 Aug 2011 10:15:49 +0000 (UTC) This patch is needed for compatibility with the change of cpu_architecture from a function to a global variable. Since cpu_architecture is ARM-specific, also add an explicit include for rather than relying on this being included as a side-effect. Signed-off-by: Dave Martin --- arch/arm/kernel/kprobes-common.c | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/arch/arm/kernel/kprobes-common.c b/arch/arm/kernel/kprobes-common.c index a5394fb4..bbf248c 100644 --- a/arch/arm/kernel/kprobes-common.c +++ b/arch/arm/kernel/kprobes-common.c @@ -13,6 +13,7 @@ #include #include +#include #include "kprobes.h" @@ -51,9 +52,8 @@ bool load_write_pc_interworks; void __init test_load_write_pc_interworking(void) { - int arch = cpu_architecture(); - BUG_ON(arch == CPU_ARCH_UNKNOWN); - load_write_pc_interworks = arch >= CPU_ARCH_ARMv5T; + BUG_ON(cpu_architecture == CPU_ARCH_UNKNOWN); + load_write_pc_interworks = cpu_architecture >= CPU_ARCH_ARMv5T; } #endif /* !test_load_write_pc_interworking */ @@ -65,9 +65,8 @@ bool alu_write_pc_interworks; void __init test_alu_write_pc_interworking(void) { - int arch = cpu_architecture(); - BUG_ON(arch == CPU_ARCH_UNKNOWN); - alu_write_pc_interworks = arch >= CPU_ARCH_ARMv7; + BUG_ON(cpu_architecture == CPU_ARCH_UNKNOWN); + alu_write_pc_interworks = cpu_architecture >= CPU_ARCH_ARMv7; } #endif /* !test_alu_write_pc_interworking */