From patchwork Thu Jun 9 15:58:57 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 866102 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 p59G1KKh014959 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 9 Jun 2011 16:01:41 GMT Received: from canuck.infradead.org ([134.117.69.58]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QUhfP-0003AD-Ea; Thu, 09 Jun 2011 16:01:07 +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 1QUhfP-0001Bt-0g; Thu, 09 Jun 2011 16:01:07 +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 1QUhdf-0000p6-36 for linux-arm-kernel@lists.infradead.org; Thu, 09 Jun 2011 15:59:22 +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 p59FvmFE002664; Thu, 9 Jun 2011 16:57:49 +0100 (BST) From: Will Deacon To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 05/10] ARM: idmap: add header file for identity mapping functions Date: Thu, 9 Jun 2011 16:58:57 +0100 Message-Id: <1307635142-11312-6-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: <1307635142-11312-1-git-send-email-will.deacon@arm.com> References: <1307635142-11312-1-git-send-email-will.deacon@arm.com> X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110609_115919_459237_333B5DEF X-CRM114-Status: GOOD ( 12.49 ) 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 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]); Thu, 09 Jun 2011 16:01:41 +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