aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mm
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2015-09-01 02:59:28 -0400
committerard <ard.biesheuvel@linaro.org>2015-12-13 13:18:28 -0500
commit2937367b8a4b0d46ce3312cb997e4a240b02cf15 (patch)
tree44454d1cfd965482d661c92d17264d6affa77a6a /arch/arm/mm
parentf7d924894265794f447ea799dd853400749b5a22 (diff)
ARM: add support for generic early_ioremap/early_memremap
This enables the generic early_ioremap implementation for ARM. It uses the fixmap region reserved for kmap. Since early_ioremap is only supported before paging_init(), and kmap is only supported afterwards, this is guaranteed not to cause any clashes. Tested-by: Ryan Harkin <ryan.harkin@linaro.org> Reviewed-by: Matt Fleming <matt@codeblueprint.co.uk> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Diffstat (limited to 'arch/arm/mm')
-rw-r--r--arch/arm/mm/ioremap.c9
-rw-r--r--arch/arm/mm/mmu.c2
2 files changed, 10 insertions, 1 deletions
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c
index 0c81056c1dd7..66a978d05958 100644
--- a/arch/arm/mm/ioremap.c
+++ b/arch/arm/mm/ioremap.c
@@ -30,6 +30,7 @@
30#include <asm/cp15.h> 30#include <asm/cp15.h>
31#include <asm/cputype.h> 31#include <asm/cputype.h>
32#include <asm/cacheflush.h> 32#include <asm/cacheflush.h>
33#include <asm/early_ioremap.h>
33#include <asm/mmu_context.h> 34#include <asm/mmu_context.h>
34#include <asm/pgalloc.h> 35#include <asm/pgalloc.h>
35#include <asm/tlbflush.h> 36#include <asm/tlbflush.h>
@@ -469,3 +470,11 @@ int pci_ioremap_io(unsigned int offset, phys_addr_t phys_addr)
469} 470}
470EXPORT_SYMBOL_GPL(pci_ioremap_io); 471EXPORT_SYMBOL_GPL(pci_ioremap_io);
471#endif 472#endif
473
474/*
475 * Must be called after early_fixmap_init
476 */
477void __init early_ioremap_init(void)
478{
479 early_ioremap_setup();
480}
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index 4867f5daf82c..de19f90221e2 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -390,7 +390,7 @@ void __init early_fixmap_init(void)
390 * The early fixmap range spans multiple pmds, for which 390 * The early fixmap range spans multiple pmds, for which
391 * we are not prepared: 391 * we are not prepared:
392 */ 392 */
393 BUILD_BUG_ON((__fix_to_virt(__end_of_permanent_fixed_addresses) >> PMD_SHIFT) 393 BUILD_BUG_ON((__fix_to_virt(__end_of_early_ioremap_region) >> PMD_SHIFT)
394 != FIXADDR_TOP >> PMD_SHIFT); 394 != FIXADDR_TOP >> PMD_SHIFT);
395 395
396 pmd = fixmap_pmd(FIXADDR_TOP); 396 pmd = fixmap_pmd(FIXADDR_TOP);