aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/mm/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/mm/init.c')
-rw-r--r--arch/sh/mm/init.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c
index 79c309780f95..094225e0d722 100644
--- a/arch/sh/mm/init.c
+++ b/arch/sh/mm/init.c
@@ -23,6 +23,7 @@
23 23
24DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); 24DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
25pgd_t swapper_pg_dir[PTRS_PER_PGD]; 25pgd_t swapper_pg_dir[PTRS_PER_PGD];
26unsigned long cached_to_uncached = 0;
26 27
27void show_mem(void) 28void show_mem(void)
28{ 29{
@@ -99,7 +100,8 @@ static void set_pte_phys(unsigned long addr, unsigned long phys, pgprot_t prot)
99 100
100 set_pte(pte, pfn_pte(phys >> PAGE_SHIFT, prot)); 101 set_pte(pte, pfn_pte(phys >> PAGE_SHIFT, prot));
101 102
102 flush_tlb_one(get_asid(), addr); 103 if (cached_to_uncached)
104 flush_tlb_one(get_asid(), addr);
103} 105}
104 106
105/* 107/*
@@ -164,6 +166,18 @@ void __init paging_init(void)
164 } 166 }
165 167
166 free_area_init_nodes(max_zone_pfns); 168 free_area_init_nodes(max_zone_pfns);
169
170 /* Set up the uncached fixmap */
171 set_fixmap_nocache(FIX_UNCACHED, __pa(&__uncached_start));
172
173#ifdef CONFIG_29BIT
174 /*
175 * Handle trivial transitions between cached and uncached
176 * segments, making use of the 1:1 mapping relationship in
177 * 512MB lowmem.
178 */
179 cached_to_uncached = P2SEG - P1SEG;
180#endif
167} 181}
168 182
169static struct kcore_list kcore_mem, kcore_vmalloc; 183static struct kcore_list kcore_mem, kcore_vmalloc;