]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/sh/mm/init.c
sh: Preparation for uncached jumps through PMB.
[linux-2.6-omap-h63xx.git] / arch / sh / mm / init.c
index 79c309780f953a16bf65c621aae490ffe10e9c8d..094225e0d722d2dcd57f1c34abbbf948deff3e33 100644 (file)
@@ -23,6 +23,7 @@
 
 DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
 pgd_t swapper_pg_dir[PTRS_PER_PGD];
+unsigned long cached_to_uncached = 0;
 
 void show_mem(void)
 {
@@ -99,7 +100,8 @@ static void set_pte_phys(unsigned long addr, unsigned long phys, pgprot_t prot)
 
        set_pte(pte, pfn_pte(phys >> PAGE_SHIFT, prot));
 
-       flush_tlb_one(get_asid(), addr);
+       if (cached_to_uncached)
+               flush_tlb_one(get_asid(), addr);
 }
 
 /*
@@ -164,6 +166,18 @@ void __init paging_init(void)
        }
 
        free_area_init_nodes(max_zone_pfns);
+
+       /* Set up the uncached fixmap */
+       set_fixmap_nocache(FIX_UNCACHED, __pa(&__uncached_start));
+
+#ifdef CONFIG_29BIT
+       /*
+        * Handle trivial transitions between cached and uncached
+        * segments, making use of the 1:1 mapping relationship in
+        * 512MB lowmem.
+        */
+       cached_to_uncached = P2SEG - P1SEG;
+#endif
 }
 
 static struct kcore_list kcore_mem, kcore_vmalloc;