new file mode 100644
@@ -0,0 +1,11 @@
+#ifndef _ARM_IDMAP_H
+#define _ARM_IDMAP_H
+
+#include <asm/page.h>
+
+void identity_mapping_add(pgd_t *pgd, unsigned long addr, unsigned long end);
+void identity_mapping_del(pgd_t *pgd, unsigned long addr, unsigned long end);
+
+void setup_mm_for_reboot(char mode);
+
+#endif /* _ARM_IDMAP_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 */
@@ -33,6 +33,7 @@
#include <linux/cpuidle.h>
#include <asm/cacheflush.h>
+#include <asm/idmap.h>
#include <asm/leds.h>
#include <asm/processor.h>
#include <asm/system.h>
@@ -57,8 +58,6 @@ static const char *isa_modes[] = {
"ARM" , "Thumb" , "Jazelle", "ThumbEE"
};
-extern void setup_mm_for_reboot(char mode);
-
static volatile int hlt_counter;
#include <mach/system.h>
@@ -39,6 +39,7 @@
#include <asm/tlbflush.h>
#include <asm/ptrace.h>
#include <asm/localtimer.h>
+#include <asm/idmap.h>
/*
* as from 2.5, kernels no longer have an init_tasks structure
@@ -1,6 +1,7 @@
#include <linux/kernel.h>
#include <asm/cputype.h>
+#include <asm/idmap.h>
#include <asm/pgalloc.h>
#include <asm/pgtable.h>
@@ -71,6 +72,10 @@ void identity_mapping_del(pgd_t *pgd, unsigned long addr, unsigned long end)
idmap_del_pud(pgd, addr, next);
} while (pgd++, addr = next, addr != end);
}
+#else
+void identity_mapping_del(pgd_t *pgd, unsigned long addr, unsigned long end)
+{
+}
#endif
/*
The identity mappings functions are useful outside of SMP booting, so expose them through their own header file. Signed-off-by: Will Deacon <will.deacon@arm.com> --- arch/arm/include/asm/idmap.h | 11 +++++++++++ arch/arm/include/asm/pgtable.h | 3 --- arch/arm/kernel/process.c | 3 +-- arch/arm/kernel/smp.c | 1 + arch/arm/mm/idmap.c | 5 +++++ 5 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 arch/arm/include/asm/idmap.h