Revert "arm: mm: hugetlb WT hack"
[pandora-kernel.git] / arch / arm / mm / mmu.c
index 7a4e67f..0a5191e 100644 (file)
@@ -451,6 +451,14 @@ static void __init build_mem_type_table(void)
                mem_types[MT_MEMORY_NONCACHED].prot_sect |= PMD_SECT_S;
                mem_types[MT_MEMORY_NONCACHED].prot_pte |= L_PTE_SHARED;
        }
+       /*
+        * 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.
+        */
+       if (cpu_arch == CPU_ARCH_ARMv6)
+               vecs_pgprot |= L_PTE_MT_VECTORS;
+
        /*
         * ARMv6 and above have extended page tables.
         */
@@ -564,12 +572,6 @@ static void __init build_mem_type_table(void)
 
        arm_hugepmdprotval = mem_types[MT_MEMORY].prot_sect | PMD_SECT_AP_READ
                                | PMD_SECT_nG;
-
-       /* HACK: make huge pages WT
-        * XXX: mm will not know nothing about this..
-        * FIXME: should only do it on Cortex-A8 or below */
-       arm_hugepmdprotval &= ~(PMD_SECT_WB | PMD_SECT_TEX(1));
-       arm_hugepmdprotval |= PMD_SECT_WT;
 #endif
 
 }