From patchwork Wed Jun 15 17:23:15 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 882922 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 p5FHRli0020125 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 15 Jun 2011 17:28:08 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QWtsC-0008Jg-E5; Wed, 15 Jun 2011 17:27:25 +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 1QWtsB-0004Nd-87; Wed, 15 Jun 2011 17:27:23 +0000 Received: from cam-admin0.cambridge.arm.com ([217.140.96.50]) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QWtps-0003km-0e for linux-arm-kernel@lists.infradead.org; Wed, 15 Jun 2011 17:25:05 +0000 Received: from localhost.localdomain (e102144-lin.cambridge.arm.com [10.1.69.60]) by cam-admin0.cambridge.arm.com (8.12.6/8.12.6) with ESMTP id p5FHLwFD026709; Wed, 15 Jun 2011 18:22:24 +0100 (BST) From: Will Deacon To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 4/9] ARM: idmap: add header file for identity mapping functions Date: Wed, 15 Jun 2011 18:23:15 +0100 Message-Id: <1308158600-7169-5-git-send-email-will.deacon@arm.com> X-Mailer: git-send-email 1.7.0.4 MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1308158600-7169-1-git-send-email-will.deacon@arm.com> References: <1308158600-7169-1-git-send-email-will.deacon@arm.com> X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110615_132500_503862_466C4287 X-CRM114-Status: GOOD ( 12.60 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain Cc: frank.hofmann@tomtom.com, dave.martin@linaro.org, Will Deacon , ccross@android.com 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: , 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, 15 Jun 2011 17:28:08 +0000 (UTC) The identity mappings functions are useful outside of SMP booting, so expose them through their own header file. Signed-off-by: Will Deacon --- arch/arm/include/asm/idmap.h | 16 ++++++++++++++++ arch/arm/include/asm/pgtable.h | 3 --- arch/arm/kernel/process.c | 3 +-- arch/arm/kernel/smp.c | 1 + arch/arm/mm/idmap.c | 1 + 5 files changed, 19 insertions(+), 5 deletions(-) create mode 100644 arch/arm/include/asm/idmap.h diff --git a/arch/arm/include/asm/idmap.h b/arch/arm/include/asm/idmap.h new file mode 100644 index 0000000..ea9517e --- /dev/null +++ b/arch/arm/include/asm/idmap.h @@ -0,0 +1,16 @@ +#ifndef _ARM_IDMAP_H +#define _ARM_IDMAP_H + +#include + +void identity_mapping_add(pgd_t *pgd, unsigned long addr, unsigned long end); + +#ifdef CONFIG_SMP +void identity_mapping_del(pgd_t *pgd, unsigned long addr, unsigned long end); +#else +void identity_mapping_del(pgd_t *pgd, unsigned long addr, unsigned long end) {}; +#endif + +void setup_mm_for_reboot(char mode); + +#endif /* _ARM_IDMAP_H */ diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h index 5750704..9d559a8 100644 --- a/arch/arm/include/asm/pgtable.h +++ b/arch/arm/include/asm/pgtable.h @@ -474,9 +474,6 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) #define pgtable_cache_init() do { } while (0) -void identity_mapping_add(pgd_t *, unsigned long, unsigned long); -void identity_mapping_del(pgd_t *, unsigned long, unsigned long); - #endif /* !__ASSEMBLY__ */ #endif /* CONFIG_MMU */ diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index 5e1e541..8bd9d94 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c @@ -32,6 +32,7 @@ #include #include +#include #include #include #include @@ -56,8 +57,6 @@ static const char *isa_modes[] = { "ARM" , "Thumb" , "Jazelle", "ThumbEE" }; -extern void setup_mm_for_reboot(char mode); - static volatile int hlt_counter; #include diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index 344e52b..dfc76aa 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c @@ -39,6 +39,7 @@ #include #include #include +#include /* * as from 2.5, kernels no longer have an init_tasks structure diff --git a/arch/arm/mm/idmap.c b/arch/arm/mm/idmap.c index 2be9139..4ae0f09 100644 --- a/arch/arm/mm/idmap.c +++ b/arch/arm/mm/idmap.c @@ -1,6 +1,7 @@ #include #include +#include #include #include