aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mm
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2012-01-18 10:32:49 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-01-23 05:24:11 -0500
commit94e5a85b3be0ce109d26aa6812b2a02c518a0e4b (patch)
treefb809876ee6b193489bbca6767c04df346466f1c /arch/arm/mm
parent45cd5290bfd358e9885c0bf47a8c46671a92f716 (diff)
ARM: earlier initialization of vectors page
Initialize the contents of the vectors page immediately after we allocate the page, but before we map it. This avoids any possible aliases with other mappings which may need to be flushed after the page has been mapped irrespective of the cache type. We follow this later with a flush_cache_all() after all static memory mappings have been initialized, which ensures that this is safe from any cache effects. Tested-by: Catalin Marinas <catalin.marinas@arm.com> Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> Acked-by: Nicolas Pitre <nico@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mm')
-rw-r--r--arch/arm/mm/mmu.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index 94c5a0c94f5e..c1263adc2a26 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -997,11 +997,14 @@ static void __init devicemaps_init(struct machine_desc *mdesc)
997{ 997{
998 struct map_desc map; 998 struct map_desc map;
999 unsigned long addr; 999 unsigned long addr;
1000 void *vectors;
1000 1001
1001 /* 1002 /*
1002 * Allocate the vector page early. 1003 * Allocate the vector page early.
1003 */ 1004 */
1004 vectors_page = early_alloc(PAGE_SIZE); 1005 vectors = early_alloc(PAGE_SIZE);
1006
1007 early_trap_init(vectors);
1005 1008
1006 for (addr = VMALLOC_START; addr; addr += PMD_SIZE) 1009 for (addr = VMALLOC_START; addr; addr += PMD_SIZE)
1007 pmd_clear(pmd_off_k(addr)); 1010 pmd_clear(pmd_off_k(addr));
@@ -1041,7 +1044,7 @@ static void __init devicemaps_init(struct machine_desc *mdesc)
1041 * location (0xffff0000). If we aren't using high-vectors, also 1044 * location (0xffff0000). If we aren't using high-vectors, also
1042 * create a mapping at the low-vectors virtual address. 1045 * create a mapping at the low-vectors virtual address.
1043 */ 1046 */
1044 map.pfn = __phys_to_pfn(virt_to_phys(vectors_page)); 1047 map.pfn = __phys_to_pfn(virt_to_phys(vectors));
1045 map.virtual = 0xffff0000; 1048 map.virtual = 0xffff0000;
1046 map.length = PAGE_SIZE; 1049 map.length = PAGE_SIZE;
1047 map.type = MT_HIGH_VECTORS; 1050 map.type = MT_HIGH_VECTORS;