diff options
Diffstat (limited to 'arch/arm/mm/mmu.c')
-rw-r--r-- | arch/arm/mm/mmu.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index b3fdb63783e3..53cdbd39ec8e 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c | |||
@@ -1195,7 +1195,7 @@ static void __init devicemaps_init(struct machine_desc *mdesc) | |||
1195 | /* | 1195 | /* |
1196 | * Allocate the vector page early. | 1196 | * Allocate the vector page early. |
1197 | */ | 1197 | */ |
1198 | vectors = early_alloc(PAGE_SIZE); | 1198 | vectors = early_alloc(PAGE_SIZE * 2); |
1199 | 1199 | ||
1200 | early_trap_init(vectors); | 1200 | early_trap_init(vectors); |
1201 | 1201 | ||
@@ -1240,15 +1240,27 @@ static void __init devicemaps_init(struct machine_desc *mdesc) | |||
1240 | map.pfn = __phys_to_pfn(virt_to_phys(vectors)); | 1240 | map.pfn = __phys_to_pfn(virt_to_phys(vectors)); |
1241 | map.virtual = 0xffff0000; | 1241 | map.virtual = 0xffff0000; |
1242 | map.length = PAGE_SIZE; | 1242 | map.length = PAGE_SIZE; |
1243 | #ifdef CONFIG_KUSER_HELPERS | ||
1243 | map.type = MT_HIGH_VECTORS; | 1244 | map.type = MT_HIGH_VECTORS; |
1245 | #else | ||
1246 | map.type = MT_LOW_VECTORS; | ||
1247 | #endif | ||
1244 | create_mapping(&map); | 1248 | create_mapping(&map); |
1245 | 1249 | ||
1246 | if (!vectors_high()) { | 1250 | if (!vectors_high()) { |
1247 | map.virtual = 0; | 1251 | map.virtual = 0; |
1252 | map.length = PAGE_SIZE * 2; | ||
1248 | map.type = MT_LOW_VECTORS; | 1253 | map.type = MT_LOW_VECTORS; |
1249 | create_mapping(&map); | 1254 | create_mapping(&map); |
1250 | } | 1255 | } |
1251 | 1256 | ||
1257 | /* Now create a kernel read-only mapping */ | ||
1258 | map.pfn += 1; | ||
1259 | map.virtual = 0xffff0000 + PAGE_SIZE; | ||
1260 | map.length = PAGE_SIZE; | ||
1261 | map.type = MT_LOW_VECTORS; | ||
1262 | create_mapping(&map); | ||
1263 | |||
1252 | /* | 1264 | /* |
1253 | * Ask the machine support to map in the statically mapped devices. | 1265 | * Ask the machine support to map in the statically mapped devices. |
1254 | */ | 1266 | */ |