diff options
Diffstat (limited to 'arch/arm/mm/mmu.c')
-rw-r--r-- | arch/arm/mm/mmu.c | 37 |
1 files changed, 29 insertions, 8 deletions
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index f866bf6b97d4..655c8376f0b5 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c | |||
@@ -154,6 +154,26 @@ static int __init noalign_setup(char *__unused) | |||
154 | } | 154 | } |
155 | __setup("noalign", noalign_setup); | 155 | __setup("noalign", noalign_setup); |
156 | 156 | ||
157 | #ifndef CONFIG_SMP | ||
158 | void adjust_cr(unsigned long mask, unsigned long set) | ||
159 | { | ||
160 | unsigned long flags; | ||
161 | |||
162 | mask &= ~CR_A; | ||
163 | |||
164 | set &= mask; | ||
165 | |||
166 | local_irq_save(flags); | ||
167 | |||
168 | cr_no_alignment = (cr_no_alignment & ~mask) | set; | ||
169 | cr_alignment = (cr_alignment & ~mask) | set; | ||
170 | |||
171 | set_cr((get_cr() & ~mask) | set); | ||
172 | |||
173 | local_irq_restore(flags); | ||
174 | } | ||
175 | #endif | ||
176 | |||
157 | struct mem_types { | 177 | struct mem_types { |
158 | unsigned int prot_pte; | 178 | unsigned int prot_pte; |
159 | unsigned int prot_l1; | 179 | unsigned int prot_l1; |
@@ -265,7 +285,7 @@ static void __init build_mem_type_table(void) | |||
265 | if (arch_is_coherent()) { | 285 | if (arch_is_coherent()) { |
266 | if (cpu_is_xsc3()) { | 286 | if (cpu_is_xsc3()) { |
267 | mem_types[MT_MEMORY].prot_sect |= PMD_SECT_S; | 287 | mem_types[MT_MEMORY].prot_sect |= PMD_SECT_S; |
268 | mem_types[MT_MEMORY].prot_pte |= L_PTE_COHERENT; | 288 | mem_types[MT_MEMORY].prot_pte |= L_PTE_SHARED; |
269 | } | 289 | } |
270 | } | 290 | } |
271 | 291 | ||
@@ -294,12 +314,6 @@ static void __init build_mem_type_table(void) | |||
294 | mem_types[MT_DEVICE].prot_pte |= L_PTE_BUFFERABLE; | 314 | mem_types[MT_DEVICE].prot_pte |= L_PTE_BUFFERABLE; |
295 | mem_types[MT_DEVICE].prot_sect |= PMD_SECT_BUFFERED; | 315 | mem_types[MT_DEVICE].prot_sect |= PMD_SECT_BUFFERED; |
296 | 316 | ||
297 | /* | ||
298 | * User pages need to be mapped with the ASID | ||
299 | * (iow, non-global) | ||
300 | */ | ||
301 | user_pgprot |= L_PTE_ASID; | ||
302 | |||
303 | #ifdef CONFIG_SMP | 317 | #ifdef CONFIG_SMP |
304 | /* | 318 | /* |
305 | * Mark memory with the "shared" attribute for SMP systems | 319 | * Mark memory with the "shared" attribute for SMP systems |
@@ -408,7 +422,7 @@ alloc_init_page(unsigned long virt, unsigned long phys, unsigned int prot_l1, pg | |||
408 | } | 422 | } |
409 | ptep = pte_offset_kernel(pmdp, virt); | 423 | ptep = pte_offset_kernel(pmdp, virt); |
410 | 424 | ||
411 | set_pte(ptep, pfn_pte(phys >> PAGE_SHIFT, prot)); | 425 | set_pte_ext(ptep, pfn_pte(phys >> PAGE_SHIFT, prot), 0); |
412 | } | 426 | } |
413 | 427 | ||
414 | /* | 428 | /* |
@@ -619,6 +633,13 @@ void __init reserve_node_zero(pg_data_t *pgdat) | |||
619 | if (machine_is_p720t()) | 633 | if (machine_is_p720t()) |
620 | res_size = 0x00014000; | 634 | res_size = 0x00014000; |
621 | 635 | ||
636 | /* H1940 and RX3715 need to reserve this for suspend */ | ||
637 | |||
638 | if (machine_is_h1940() || machine_is_rx3715()) { | ||
639 | reserve_bootmem_node(pgdat, 0x30003000, 0x1000); | ||
640 | reserve_bootmem_node(pgdat, 0x30081000, 0x1000); | ||
641 | } | ||
642 | |||
622 | #ifdef CONFIG_SA1111 | 643 | #ifdef CONFIG_SA1111 |
623 | /* | 644 | /* |
624 | * Because of the SA1111 DMA bug, we want to preserve our | 645 | * Because of the SA1111 DMA bug, we want to preserve our |