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: Dave Martin X-Patchwork-Id: 3342 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 5FA6A23F46 for ; Wed, 10 Aug 2011 10:14:00 +0000 (UTC) Received: from mail-qy0-f173.google.com (mail-qy0-f173.google.com [209.85.216.173]) by fiordland.canonical.com (Postfix) with ESMTP id 2DD2FA18821 for ; Wed, 10 Aug 2011 10:14:00 +0000 (UTC) Received: by qyk31 with SMTP id 31so3151111qyk.11 for ; Wed, 10 Aug 2011 03:13:59 -0700 (PDT) Received: by 10.229.159.194 with SMTP id k2mr2841196qcx.83.1312971239634; Wed, 10 Aug 2011 03:13:59 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.229.190.71 with SMTP id dh7cs74594qcb; Wed, 10 Aug 2011 03:13:59 -0700 (PDT) Received: from mr.google.com ([10.216.4.132]) by 10.216.4.132 with SMTP id 4mr2927709wej.49.1312971239293 (num_hops = 1); Wed, 10 Aug 2011 03:13:59 -0700 (PDT) Received: by 10.216.4.132 with SMTP id 4mr2003251wej.49.1312971238648; Wed, 10 Aug 2011 03:13:58 -0700 (PDT) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx.google.com with ESMTPS id y18si1980236weq.137.2011.08.10.03.13.57 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 10 Aug 2011 03:13:58 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.50 is neither permitted nor denied by best guess record for domain of dave.martin@linaro.org) client-ip=74.125.82.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.50 is neither permitted nor denied by best guess record for domain of dave.martin@linaro.org) smtp.mail=dave.martin@linaro.org Received: by mail-ww0-f50.google.com with SMTP id 36so955547wwi.31 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 Cc: patches@linaro.org, Ben Dooks , Kukjin Kim , Nicolas Pitre , Jon Medhurst 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> 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 */