rk: revert to v3.10
[firefly-linux-kernel-4.4.55.git] / arch / arm / mm / mmu.c
index fb3c446af9e5ea4ddd98c85bfbd36db135092f2f..4d409e6a552df67f11ea8bb81b1930e830c3dcde 100644 (file)
@@ -458,16 +458,6 @@ static void __init build_mem_type_table(void)
        s2_pgprot = cp->pte_s2;
        hyp_device_pgprot = s2_device_pgprot = mem_types[MT_DEVICE].prot_pte;
 
-       /*
-        * We don't use domains on ARMv6 (since this causes problems with
-        * v6/v7 kernels), so we must use a separate memory type for user
-        * r/o, kernel r/w to map the vectors page.
-        */
-#ifndef CONFIG_ARM_LPAE
-       if (cpu_arch == CPU_ARCH_ARMv6)
-               vecs_pgprot |= L_PTE_MT_VECTORS;
-#endif
-
        /*
         * ARMv6 and above have extended page tables.
         */
@@ -1185,7 +1175,7 @@ static void __init devicemaps_init(struct machine_desc *mdesc)
        /*
         * Allocate the vector page early.
         */
-       vectors = early_alloc(PAGE_SIZE * 2);
+       vectors = early_alloc(PAGE_SIZE);
 
        early_trap_init(vectors);
 
@@ -1230,27 +1220,15 @@ static void __init devicemaps_init(struct machine_desc *mdesc)
        map.pfn = __phys_to_pfn(virt_to_phys(vectors));
        map.virtual = 0xffff0000;
        map.length = PAGE_SIZE;
-#ifdef CONFIG_KUSER_HELPERS
        map.type = MT_HIGH_VECTORS;
-#else
-       map.type = MT_LOW_VECTORS;
-#endif
        create_mapping(&map);
 
        if (!vectors_high()) {
                map.virtual = 0;
-               map.length = PAGE_SIZE * 2;
                map.type = MT_LOW_VECTORS;
                create_mapping(&map);
        }
 
-       /* Now create a kernel read-only mapping */
-       map.pfn += 1;
-       map.virtual = 0xffff0000 + PAGE_SIZE;
-       map.length = PAGE_SIZE;
-       map.type = MT_LOW_VECTORS;
-       create_mapping(&map);
-
        /*
         * Ask the machine support to map in the statically mapped devices.
         */