aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mm')
-rw-r--r--arch/arm/mm/Kconfig6
-rw-r--r--arch/arm/mm/consistent.c2
-rw-r--r--arch/arm/mm/copypage-v4mc.c8
-rw-r--r--arch/arm/mm/copypage-v6.c10
-rw-r--r--arch/arm/mm/copypage-xscale.c8
-rw-r--r--arch/arm/mm/fault-armv.c2
-rw-r--r--arch/arm/mm/fault.c2
-rw-r--r--arch/arm/mm/flush.c41
-rw-r--r--arch/arm/mm/ioremap.c102
-rw-r--r--arch/arm/mm/mm.h5
-rw-r--r--arch/arm/mm/mmu.c37
-rw-r--r--arch/arm/mm/nommu.c4
-rw-r--r--arch/arm/mm/pgd.c2
-rw-r--r--arch/arm/mm/proc-arm1020.S6
-rw-r--r--arch/arm/mm/proc-arm1020e.S6
-rw-r--r--arch/arm/mm/proc-arm1022.S8
-rw-r--r--arch/arm/mm/proc-arm1026.S8
-rw-r--r--arch/arm/mm/proc-arm6_7.S12
-rw-r--r--arch/arm/mm/proc-arm720.S8
-rw-r--r--arch/arm/mm/proc-arm740.S2
-rw-r--r--arch/arm/mm/proc-arm7tdmi.S2
-rw-r--r--arch/arm/mm/proc-arm920.S8
-rw-r--r--arch/arm/mm/proc-arm922.S8
-rw-r--r--arch/arm/mm/proc-arm925.S8
-rw-r--r--arch/arm/mm/proc-arm926.S10
-rw-r--r--arch/arm/mm/proc-arm940.S2
-rw-r--r--arch/arm/mm/proc-arm946.S2
-rw-r--r--arch/arm/mm/proc-arm9tdmi.S2
-rw-r--r--arch/arm/mm/proc-sa110.S8
-rw-r--r--arch/arm/mm/proc-sa1100.S8
-rw-r--r--arch/arm/mm/proc-syms.c2
-rw-r--r--arch/arm/mm/proc-v6.S41
-rw-r--r--arch/arm/mm/proc-xsc3.S21
-rw-r--r--arch/arm/mm/proc-xscale.S17
34 files changed, 236 insertions, 182 deletions
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
index c0bfb8212b77..aade2f72c920 100644
--- a/arch/arm/mm/Kconfig
+++ b/arch/arm/mm/Kconfig
@@ -197,7 +197,7 @@ config CPU_ARM940T
197 select CPU_CP15_MPU 197 select CPU_CP15_MPU
198 help 198 help
199 ARM940T is a member of the ARM9TDMI family of general- 199 ARM940T is a member of the ARM9TDMI family of general-
200 purpose microprocessors with MPU and seperate 4KB 200 purpose microprocessors with MPU and separate 4KB
201 instruction and 4KB data cases, each with a 4-word line 201 instruction and 4KB data cases, each with a 4-word line
202 length. 202 length.
203 203
@@ -333,7 +333,7 @@ config CPU_XSCALE
333# XScale Core Version 3 333# XScale Core Version 3
334config CPU_XSC3 334config CPU_XSC3
335 bool 335 bool
336 depends on ARCH_IXP23XX 336 depends on ARCH_IXP23XX || ARCH_IOP13XX
337 default y 337 default y
338 select CPU_32v5 338 select CPU_32v5
339 select CPU_ABRT_EV5T 339 select CPU_ABRT_EV5T
@@ -580,7 +580,7 @@ config CPU_CACHE_ROUND_ROBIN
580 580
581config CPU_BPREDICT_DISABLE 581config CPU_BPREDICT_DISABLE
582 bool "Disable branch prediction" 582 bool "Disable branch prediction"
583 depends on CPU_ARM1020 || CPU_V6 583 depends on CPU_ARM1020 || CPU_V6 || CPU_XSC3
584 help 584 help
585 Say Y here to disable branch prediction. If unsure, say N. 585 Say Y here to disable branch prediction. If unsure, say N.
586 586
diff --git a/arch/arm/mm/consistent.c b/arch/arm/mm/consistent.c
index b797217e82be..6a9c362fef5e 100644
--- a/arch/arm/mm/consistent.c
+++ b/arch/arm/mm/consistent.c
@@ -238,7 +238,7 @@ __dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp,
238 * x86 does not mark the pages reserved... 238 * x86 does not mark the pages reserved...
239 */ 239 */
240 SetPageReserved(page); 240 SetPageReserved(page);
241 set_pte(pte, mk_pte(page, prot)); 241 set_pte_ext(pte, mk_pte(page, prot), 0);
242 page++; 242 page++;
243 pte++; 243 pte++;
244 off++; 244 off++;
diff --git a/arch/arm/mm/copypage-v4mc.c b/arch/arm/mm/copypage-v4mc.c
index df1645e14b4c..ded0e96d069d 100644
--- a/arch/arm/mm/copypage-v4mc.c
+++ b/arch/arm/mm/copypage-v4mc.c
@@ -19,6 +19,7 @@
19#include <asm/page.h> 19#include <asm/page.h>
20#include <asm/pgtable.h> 20#include <asm/pgtable.h>
21#include <asm/tlbflush.h> 21#include <asm/tlbflush.h>
22#include <asm/cacheflush.h>
22 23
23#include "mm.h" 24#include "mm.h"
24 25
@@ -69,9 +70,14 @@ mc_copy_user_page(void *from, void *to)
69 70
70void v4_mc_copy_user_page(void *kto, const void *kfrom, unsigned long vaddr) 71void v4_mc_copy_user_page(void *kto, const void *kfrom, unsigned long vaddr)
71{ 72{
73 struct page *page = virt_to_page(kfrom);
74
75 if (test_and_clear_bit(PG_dcache_dirty, &page->flags))
76 __flush_dcache_page(page_mapping(page), page);
77
72 spin_lock(&minicache_lock); 78 spin_lock(&minicache_lock);
73 79
74 set_pte(TOP_PTE(0xffff8000), pfn_pte(__pa(kfrom) >> PAGE_SHIFT, minicache_pgprot)); 80 set_pte_ext(TOP_PTE(0xffff8000), pfn_pte(__pa(kfrom) >> PAGE_SHIFT, minicache_pgprot), 0);
75 flush_tlb_kernel_page(0xffff8000); 81 flush_tlb_kernel_page(0xffff8000);
76 82
77 mc_copy_user_page((void *)0xffff8000, kto); 83 mc_copy_user_page((void *)0xffff8000, kto);
diff --git a/arch/arm/mm/copypage-v6.c b/arch/arm/mm/copypage-v6.c
index 3d0d3a963d20..3adb79257f43 100644
--- a/arch/arm/mm/copypage-v6.c
+++ b/arch/arm/mm/copypage-v6.c
@@ -53,6 +53,10 @@ static void v6_copy_user_page_aliasing(void *kto, const void *kfrom, unsigned lo
53{ 53{
54 unsigned int offset = CACHE_COLOUR(vaddr); 54 unsigned int offset = CACHE_COLOUR(vaddr);
55 unsigned long from, to; 55 unsigned long from, to;
56 struct page *page = virt_to_page(kfrom);
57
58 if (test_and_clear_bit(PG_dcache_dirty, &page->flags))
59 __flush_dcache_page(page_mapping(page), page);
56 60
57 /* 61 /*
58 * Discard data in the kernel mapping for the new page. 62 * Discard data in the kernel mapping for the new page.
@@ -70,8 +74,8 @@ static void v6_copy_user_page_aliasing(void *kto, const void *kfrom, unsigned lo
70 */ 74 */
71 spin_lock(&v6_lock); 75 spin_lock(&v6_lock);
72 76
73 set_pte(TOP_PTE(from_address) + offset, pfn_pte(__pa(kfrom) >> PAGE_SHIFT, PAGE_KERNEL)); 77 set_pte_ext(TOP_PTE(from_address) + offset, pfn_pte(__pa(kfrom) >> PAGE_SHIFT, PAGE_KERNEL), 0);
74 set_pte(TOP_PTE(to_address) + offset, pfn_pte(__pa(kto) >> PAGE_SHIFT, PAGE_KERNEL)); 78 set_pte_ext(TOP_PTE(to_address) + offset, pfn_pte(__pa(kto) >> PAGE_SHIFT, PAGE_KERNEL), 0);
75 79
76 from = from_address + (offset << PAGE_SHIFT); 80 from = from_address + (offset << PAGE_SHIFT);
77 to = to_address + (offset << PAGE_SHIFT); 81 to = to_address + (offset << PAGE_SHIFT);
@@ -110,7 +114,7 @@ static void v6_clear_user_page_aliasing(void *kaddr, unsigned long vaddr)
110 */ 114 */
111 spin_lock(&v6_lock); 115 spin_lock(&v6_lock);
112 116
113 set_pte(TOP_PTE(to_address) + offset, pfn_pte(__pa(kaddr) >> PAGE_SHIFT, PAGE_KERNEL)); 117 set_pte_ext(TOP_PTE(to_address) + offset, pfn_pte(__pa(kaddr) >> PAGE_SHIFT, PAGE_KERNEL), 0);
114 flush_tlb_kernel_page(to); 118 flush_tlb_kernel_page(to);
115 clear_page((void *)to); 119 clear_page((void *)to);
116 120
diff --git a/arch/arm/mm/copypage-xscale.c b/arch/arm/mm/copypage-xscale.c
index 84ebe0aa379e..2e455f82a4d5 100644
--- a/arch/arm/mm/copypage-xscale.c
+++ b/arch/arm/mm/copypage-xscale.c
@@ -19,6 +19,7 @@
19#include <asm/page.h> 19#include <asm/page.h>
20#include <asm/pgtable.h> 20#include <asm/pgtable.h>
21#include <asm/tlbflush.h> 21#include <asm/tlbflush.h>
22#include <asm/cacheflush.h>
22 23
23#include "mm.h" 24#include "mm.h"
24 25
@@ -91,9 +92,14 @@ mc_copy_user_page(void *from, void *to)
91 92
92void xscale_mc_copy_user_page(void *kto, const void *kfrom, unsigned long vaddr) 93void xscale_mc_copy_user_page(void *kto, const void *kfrom, unsigned long vaddr)
93{ 94{
95 struct page *page = virt_to_page(kfrom);
96
97 if (test_and_clear_bit(PG_dcache_dirty, &page->flags))
98 __flush_dcache_page(page_mapping(page), page);
99
94 spin_lock(&minicache_lock); 100 spin_lock(&minicache_lock);
95 101
96 set_pte(TOP_PTE(COPYPAGE_MINICACHE), pfn_pte(__pa(kfrom) >> PAGE_SHIFT, minicache_pgprot)); 102 set_pte_ext(TOP_PTE(COPYPAGE_MINICACHE), pfn_pte(__pa(kfrom) >> PAGE_SHIFT, minicache_pgprot), 0);
97 flush_tlb_kernel_page(COPYPAGE_MINICACHE); 103 flush_tlb_kernel_page(COPYPAGE_MINICACHE);
98 104
99 mc_copy_user_page((void *)COPYPAGE_MINICACHE, kto); 105 mc_copy_user_page((void *)COPYPAGE_MINICACHE, kto);
diff --git a/arch/arm/mm/fault-armv.c b/arch/arm/mm/fault-armv.c
index 7fc1b35a6746..cf95c5d0ce4c 100644
--- a/arch/arm/mm/fault-armv.c
+++ b/arch/arm/mm/fault-armv.c
@@ -61,7 +61,7 @@ static int adjust_pte(struct vm_area_struct *vma, unsigned long address)
61 if (pte_present(entry) && pte_val(entry) & shared_pte_mask) { 61 if (pte_present(entry) && pte_val(entry) & shared_pte_mask) {
62 flush_cache_page(vma, address, pte_pfn(entry)); 62 flush_cache_page(vma, address, pte_pfn(entry));
63 pte_val(entry) &= ~shared_pte_mask; 63 pte_val(entry) &= ~shared_pte_mask;
64 set_pte(pte, entry); 64 set_pte_at(vma->vm_mm, address, pte, entry);
65 flush_tlb_page(vma, address); 65 flush_tlb_page(vma, address);
66 ret = 1; 66 ret = 1;
67 } 67 }
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
index 5e658a874498..9fd6d2eafb40 100644
--- a/arch/arm/mm/fault.c
+++ b/arch/arm/mm/fault.c
@@ -230,7 +230,7 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
230 * If we're in an interrupt or have no user 230 * If we're in an interrupt or have no user
231 * context, we must not take the fault.. 231 * context, we must not take the fault..
232 */ 232 */
233 if (in_interrupt() || !mm) 233 if (in_atomic() || !mm)
234 goto no_context; 234 goto no_context;
235 235
236 /* 236 /*
diff --git a/arch/arm/mm/flush.c b/arch/arm/mm/flush.c
index 454205b789d5..9df507d36e0b 100644
--- a/arch/arm/mm/flush.c
+++ b/arch/arm/mm/flush.c
@@ -26,7 +26,7 @@ static void flush_pfn_alias(unsigned long pfn, unsigned long vaddr)
26 unsigned long to = ALIAS_FLUSH_START + (CACHE_COLOUR(vaddr) << PAGE_SHIFT); 26 unsigned long to = ALIAS_FLUSH_START + (CACHE_COLOUR(vaddr) << PAGE_SHIFT);
27 const int zero = 0; 27 const int zero = 0;
28 28
29 set_pte(TOP_PTE(to), pfn_pte(pfn, PAGE_KERNEL)); 29 set_pte_ext(TOP_PTE(to), pfn_pte(pfn, PAGE_KERNEL), 0);
30 flush_tlb_kernel_page(to); 30 flush_tlb_kernel_page(to);
31 31
32 asm( "mcrr p15, 0, %1, %0, c14\n" 32 asm( "mcrr p15, 0, %1, %0, c14\n"
@@ -202,3 +202,42 @@ void flush_dcache_page(struct page *page)
202 } 202 }
203} 203}
204EXPORT_SYMBOL(flush_dcache_page); 204EXPORT_SYMBOL(flush_dcache_page);
205
206/*
207 * Flush an anonymous page so that users of get_user_pages()
208 * can safely access the data. The expected sequence is:
209 *
210 * get_user_pages()
211 * -> flush_anon_page
212 * memcpy() to/from page
213 * if written to page, flush_dcache_page()
214 */
215void __flush_anon_page(struct vm_area_struct *vma, struct page *page, unsigned long vmaddr)
216{
217 unsigned long pfn;
218
219 /* VIPT non-aliasing caches need do nothing */
220 if (cache_is_vipt_nonaliasing())
221 return;
222
223 /*
224 * Write back and invalidate userspace mapping.
225 */
226 pfn = page_to_pfn(page);
227 if (cache_is_vivt()) {
228 flush_cache_page(vma, vmaddr, pfn);
229 } else {
230 /*
231 * For aliasing VIPT, we can flush an alias of the
232 * userspace address only.
233 */
234 flush_pfn_alias(pfn, vmaddr);
235 }
236
237 /*
238 * Invalidate kernel mapping. No data should be contained
239 * in this mapping of the page. FIXME: this is overkill
240 * since we actually ask for a write-back and invalidate.
241 */
242 __cpuc_flush_dcache_page(page_address(page));
243}
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c
index 465440592791..251685fe73a8 100644
--- a/arch/arm/mm/ioremap.c
+++ b/arch/arm/mm/ioremap.c
@@ -38,89 +38,71 @@
38 */ 38 */
39#define VM_ARM_SECTION_MAPPING 0x80000000 39#define VM_ARM_SECTION_MAPPING 0x80000000
40 40
41static inline void 41static int remap_area_pte(pmd_t *pmd, unsigned long addr, unsigned long end,
42remap_area_pte(pte_t * pte, unsigned long address, unsigned long size, 42 unsigned long phys_addr, pgprot_t prot)
43 unsigned long phys_addr, pgprot_t pgprot)
44{ 43{
45 unsigned long end; 44 pte_t *pte;
45
46 pte = pte_alloc_kernel(pmd, addr);
47 if (!pte)
48 return -ENOMEM;
46 49
47 address &= ~PMD_MASK;
48 end = address + size;
49 if (end > PMD_SIZE)
50 end = PMD_SIZE;
51 BUG_ON(address >= end);
52 do { 50 do {
53 if (!pte_none(*pte)) 51 if (!pte_none(*pte))
54 goto bad; 52 goto bad;
55 53
56 set_pte(pte, pfn_pte(phys_addr >> PAGE_SHIFT, pgprot)); 54 set_pte_ext(pte, pfn_pte(phys_addr >> PAGE_SHIFT, prot), 0);
57 address += PAGE_SIZE;
58 phys_addr += PAGE_SIZE; 55 phys_addr += PAGE_SIZE;
59 pte++; 56 } while (pte++, addr += PAGE_SIZE, addr != end);
60 } while (address && (address < end)); 57 return 0;
61 return;
62 58
63 bad: 59 bad:
64 printk("remap_area_pte: page already exists\n"); 60 printk(KERN_CRIT "remap_area_pte: page already exists\n");
65 BUG(); 61 BUG();
66} 62}
67 63
68static inline int 64static inline int remap_area_pmd(pgd_t *pgd, unsigned long addr,
69remap_area_pmd(pmd_t * pmd, unsigned long address, unsigned long size, 65 unsigned long end, unsigned long phys_addr,
70 unsigned long phys_addr, unsigned long flags) 66 pgprot_t prot)
71{ 67{
72 unsigned long end; 68 unsigned long next;
73 pgprot_t pgprot; 69 pmd_t *pmd;
74 70 int ret = 0;
75 address &= ~PGDIR_MASK;
76 end = address + size;
77
78 if (end > PGDIR_SIZE)
79 end = PGDIR_SIZE;
80 71
81 phys_addr -= address; 72 pmd = pmd_alloc(&init_mm, pgd, addr);
82 BUG_ON(address >= end); 73 if (!pmd)
74 return -ENOMEM;
83 75
84 pgprot = __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | L_PTE_WRITE | flags);
85 do { 76 do {
86 pte_t * pte = pte_alloc_kernel(pmd, address); 77 next = pmd_addr_end(addr, end);
87 if (!pte) 78 ret = remap_area_pte(pmd, addr, next, phys_addr, prot);
88 return -ENOMEM; 79 if (ret)
89 remap_area_pte(pte, address, end - address, address + phys_addr, pgprot); 80 return ret;
90 address = (address + PMD_SIZE) & PMD_MASK; 81 phys_addr += next - addr;
91 pmd++; 82 } while (pmd++, addr = next, addr != end);
92 } while (address && (address < end)); 83 return ret;
93 return 0;
94} 84}
95 85
96static int 86static int remap_area_pages(unsigned long start, unsigned long pfn,
97remap_area_pages(unsigned long start, unsigned long pfn, 87 unsigned long size, unsigned long flags)
98 unsigned long size, unsigned long flags)
99{ 88{
100 unsigned long address = start; 89 unsigned long addr = start;
101 unsigned long end = start + size; 90 unsigned long next, end = start + size;
102 unsigned long phys_addr = __pfn_to_phys(pfn); 91 unsigned long phys_addr = __pfn_to_phys(pfn);
92 pgprot_t prot = __pgprot(L_PTE_PRESENT | L_PTE_YOUNG |
93 L_PTE_DIRTY | L_PTE_WRITE | flags);
94 pgd_t *pgd;
103 int err = 0; 95 int err = 0;
104 pgd_t * dir;
105 96
106 phys_addr -= address; 97 BUG_ON(addr >= end);
107 dir = pgd_offset(&init_mm, address); 98 pgd = pgd_offset_k(addr);
108 BUG_ON(address >= end);
109 do { 99 do {
110 pmd_t *pmd = pmd_alloc(&init_mm, dir, address); 100 next = pgd_addr_end(addr, end);
111 if (!pmd) { 101 err = remap_area_pmd(pgd, addr, next, phys_addr, prot);
112 err = -ENOMEM; 102 if (err)
113 break;
114 }
115 if (remap_area_pmd(pmd, address, end - address,
116 phys_addr + address, flags)) {
117 err = -ENOMEM;
118 break; 103 break;
119 } 104 phys_addr += next - addr;
120 105 } while (pgd++, addr = next, addr != end);
121 address = (address + PGDIR_SIZE) & PGDIR_MASK;
122 dir++;
123 } while (address && (address < end));
124 106
125 return err; 107 return err;
126} 108}
@@ -310,6 +292,8 @@ __ioremap_pfn(unsigned long pfn, unsigned long offset, size_t size,
310 if (pfn >= 0x100000 && (__pfn_to_phys(pfn) & ~SUPERSECTION_MASK)) 292 if (pfn >= 0x100000 && (__pfn_to_phys(pfn) & ~SUPERSECTION_MASK))
311 return NULL; 293 return NULL;
312 294
295 size = PAGE_ALIGN(size);
296
313 area = get_vm_area(size, VM_IOREMAP); 297 area = get_vm_area(size, VM_IOREMAP);
314 if (!area) 298 if (!area)
315 return NULL; 299 return NULL;
diff --git a/arch/arm/mm/mm.h b/arch/arm/mm/mm.h
index bb2bc9ab6bd3..a44e30970635 100644
--- a/arch/arm/mm/mm.h
+++ b/arch/arm/mm/mm.h
@@ -1,4 +1,7 @@
1/* the upper-most page table pointer */ 1/* the upper-most page table pointer */
2
3#ifdef CONFIG_MMU
4
2extern pmd_t *top_pmd; 5extern pmd_t *top_pmd;
3 6
4#define TOP_PTE(x) pte_offset_kernel(top_pmd, x) 7#define TOP_PTE(x) pte_offset_kernel(top_pmd, x)
@@ -13,6 +16,8 @@ static inline pmd_t *pmd_off_k(unsigned long virt)
13 return pmd_off(pgd_offset_k(virt), virt); 16 return pmd_off(pgd_offset_k(virt), virt);
14} 17}
15 18
19#endif
20
16struct map_desc; 21struct map_desc;
17struct meminfo; 22struct meminfo;
18struct pglist_data; 23struct pglist_data;
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
158void 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
157struct mem_types { 177struct 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
diff --git a/arch/arm/mm/nommu.c b/arch/arm/mm/nommu.c
index d0e66424a597..05818fc0c705 100644
--- a/arch/arm/mm/nommu.c
+++ b/arch/arm/mm/nommu.c
@@ -6,10 +6,12 @@
6#include <linux/module.h> 6#include <linux/module.h>
7#include <linux/mm.h> 7#include <linux/mm.h>
8#include <linux/pagemap.h> 8#include <linux/pagemap.h>
9#include <linux/bootmem.h>
9 10
10#include <asm/cacheflush.h> 11#include <asm/cacheflush.h>
11#include <asm/io.h> 12#include <asm/io.h>
12#include <asm/page.h> 13#include <asm/page.h>
14#include <asm/mach/arch.h>
13 15
14#include "mm.h" 16#include "mm.h"
15 17
@@ -76,7 +78,7 @@ void __iomem *__ioremap(unsigned long phys_addr, size_t size,
76} 78}
77EXPORT_SYMBOL(__ioremap); 79EXPORT_SYMBOL(__ioremap);
78 80
79void __iounmap(void __iomem *addr) 81void __iounmap(volatile void __iomem *addr)
80{ 82{
81} 83}
82EXPORT_SYMBOL(__iounmap); 84EXPORT_SYMBOL(__iounmap);
diff --git a/arch/arm/mm/pgd.c b/arch/arm/mm/pgd.c
index 20c1b0df75f2..50b9aed6000d 100644
--- a/arch/arm/mm/pgd.c
+++ b/arch/arm/mm/pgd.c
@@ -57,7 +57,7 @@ pgd_t *get_pgd_slow(struct mm_struct *mm)
57 57
58 init_pmd = pmd_offset(init_pgd, 0); 58 init_pmd = pmd_offset(init_pgd, 0);
59 init_pte = pte_offset_map_nested(init_pmd, 0); 59 init_pte = pte_offset_map_nested(init_pmd, 0);
60 set_pte(new_pte, *init_pte); 60 set_pte_ext(new_pte, *init_pte, 0);
61 pte_unmap_nested(init_pte); 61 pte_unmap_nested(init_pte);
62 pte_unmap(new_pte); 62 pte_unmap(new_pte);
63 } 63 }
diff --git a/arch/arm/mm/proc-arm1020.S b/arch/arm/mm/proc-arm1020.S
index 1d8316f3cecf..700c04d6996e 100644
--- a/arch/arm/mm/proc-arm1020.S
+++ b/arch/arm/mm/proc-arm1020.S
@@ -29,9 +29,9 @@
29#include <linux/init.h> 29#include <linux/init.h>
30#include <asm/assembler.h> 30#include <asm/assembler.h>
31#include <asm/asm-offsets.h> 31#include <asm/asm-offsets.h>
32#include <asm/elf.h>
32#include <asm/pgtable-hwdef.h> 33#include <asm/pgtable-hwdef.h>
33#include <asm/pgtable.h> 34#include <asm/pgtable.h>
34#include <asm/procinfo.h>
35#include <asm/ptrace.h> 35#include <asm/ptrace.h>
36 36
37#include "proc-macros.S" 37#include "proc-macros.S"
@@ -397,7 +397,7 @@ ENTRY(cpu_arm1020_switch_mm)
397 * Set a PTE and flush it out 397 * Set a PTE and flush it out
398 */ 398 */
399 .align 5 399 .align 5
400ENTRY(cpu_arm1020_set_pte) 400ENTRY(cpu_arm1020_set_pte_ext)
401#ifdef CONFIG_MMU 401#ifdef CONFIG_MMU
402 str r1, [r0], #-2048 @ linux version 402 str r1, [r0], #-2048 @ linux version
403 403
@@ -477,7 +477,7 @@ arm1020_processor_functions:
477 .word cpu_arm1020_do_idle 477 .word cpu_arm1020_do_idle
478 .word cpu_arm1020_dcache_clean_area 478 .word cpu_arm1020_dcache_clean_area
479 .word cpu_arm1020_switch_mm 479 .word cpu_arm1020_switch_mm
480 .word cpu_arm1020_set_pte 480 .word cpu_arm1020_set_pte_ext
481 .size arm1020_processor_functions, . - arm1020_processor_functions 481 .size arm1020_processor_functions, . - arm1020_processor_functions
482 482
483 .section ".rodata" 483 .section ".rodata"
diff --git a/arch/arm/mm/proc-arm1020e.S b/arch/arm/mm/proc-arm1020e.S
index 89b1d6d3d7c0..1cc206ab5eae 100644
--- a/arch/arm/mm/proc-arm1020e.S
+++ b/arch/arm/mm/proc-arm1020e.S
@@ -29,9 +29,9 @@
29#include <linux/init.h> 29#include <linux/init.h>
30#include <asm/assembler.h> 30#include <asm/assembler.h>
31#include <asm/asm-offsets.h> 31#include <asm/asm-offsets.h>
32#include <asm/elf.h>
32#include <asm/pgtable-hwdef.h> 33#include <asm/pgtable-hwdef.h>
33#include <asm/pgtable.h> 34#include <asm/pgtable.h>
34#include <asm/procinfo.h>
35#include <asm/ptrace.h> 35#include <asm/ptrace.h>
36 36
37#include "proc-macros.S" 37#include "proc-macros.S"
@@ -381,7 +381,7 @@ ENTRY(cpu_arm1020e_switch_mm)
381 * Set a PTE and flush it out 381 * Set a PTE and flush it out
382 */ 382 */
383 .align 5 383 .align 5
384ENTRY(cpu_arm1020e_set_pte) 384ENTRY(cpu_arm1020e_set_pte_ext)
385#ifdef CONFIG_MMU 385#ifdef CONFIG_MMU
386 str r1, [r0], #-2048 @ linux version 386 str r1, [r0], #-2048 @ linux version
387 387
@@ -458,7 +458,7 @@ arm1020e_processor_functions:
458 .word cpu_arm1020e_do_idle 458 .word cpu_arm1020e_do_idle
459 .word cpu_arm1020e_dcache_clean_area 459 .word cpu_arm1020e_dcache_clean_area
460 .word cpu_arm1020e_switch_mm 460 .word cpu_arm1020e_switch_mm
461 .word cpu_arm1020e_set_pte 461 .word cpu_arm1020e_set_pte_ext
462 .size arm1020e_processor_functions, . - arm1020e_processor_functions 462 .size arm1020e_processor_functions, . - arm1020e_processor_functions
463 463
464 .section ".rodata" 464 .section ".rodata"
diff --git a/arch/arm/mm/proc-arm1022.S b/arch/arm/mm/proc-arm1022.S
index a089528e6bce..aff0ea08e2f8 100644
--- a/arch/arm/mm/proc-arm1022.S
+++ b/arch/arm/mm/proc-arm1022.S
@@ -18,9 +18,9 @@
18#include <linux/init.h> 18#include <linux/init.h>
19#include <asm/assembler.h> 19#include <asm/assembler.h>
20#include <asm/asm-offsets.h> 20#include <asm/asm-offsets.h>
21#include <asm/elf.h>
21#include <asm/pgtable-hwdef.h> 22#include <asm/pgtable-hwdef.h>
22#include <asm/pgtable.h> 23#include <asm/pgtable.h>
23#include <asm/procinfo.h>
24#include <asm/ptrace.h> 24#include <asm/ptrace.h>
25 25
26#include "proc-macros.S" 26#include "proc-macros.S"
@@ -358,12 +358,12 @@ ENTRY(cpu_arm1022_switch_mm)
358 mov pc, lr 358 mov pc, lr
359 359
360/* 360/*
361 * cpu_arm1022_set_pte(ptep, pte) 361 * cpu_arm1022_set_pte_ext(ptep, pte, ext)
362 * 362 *
363 * Set a PTE and flush it out 363 * Set a PTE and flush it out
364 */ 364 */
365 .align 5 365 .align 5
366ENTRY(cpu_arm1022_set_pte) 366ENTRY(cpu_arm1022_set_pte_ext)
367#ifdef CONFIG_MMU 367#ifdef CONFIG_MMU
368 str r1, [r0], #-2048 @ linux version 368 str r1, [r0], #-2048 @ linux version
369 369
@@ -441,7 +441,7 @@ arm1022_processor_functions:
441 .word cpu_arm1022_do_idle 441 .word cpu_arm1022_do_idle
442 .word cpu_arm1022_dcache_clean_area 442 .word cpu_arm1022_dcache_clean_area
443 .word cpu_arm1022_switch_mm 443 .word cpu_arm1022_switch_mm
444 .word cpu_arm1022_set_pte 444 .word cpu_arm1022_set_pte_ext
445 .size arm1022_processor_functions, . - arm1022_processor_functions 445 .size arm1022_processor_functions, . - arm1022_processor_functions
446 446
447 .section ".rodata" 447 .section ".rodata"
diff --git a/arch/arm/mm/proc-arm1026.S b/arch/arm/mm/proc-arm1026.S
index d6d84d92c7c7..65e43a109085 100644
--- a/arch/arm/mm/proc-arm1026.S
+++ b/arch/arm/mm/proc-arm1026.S
@@ -18,9 +18,9 @@
18#include <linux/init.h> 18#include <linux/init.h>
19#include <asm/assembler.h> 19#include <asm/assembler.h>
20#include <asm/asm-offsets.h> 20#include <asm/asm-offsets.h>
21#include <asm/elf.h>
21#include <asm/pgtable-hwdef.h> 22#include <asm/pgtable-hwdef.h>
22#include <asm/pgtable.h> 23#include <asm/pgtable.h>
23#include <asm/procinfo.h>
24#include <asm/ptrace.h> 24#include <asm/ptrace.h>
25 25
26#include "proc-macros.S" 26#include "proc-macros.S"
@@ -347,12 +347,12 @@ ENTRY(cpu_arm1026_switch_mm)
347 mov pc, lr 347 mov pc, lr
348 348
349/* 349/*
350 * cpu_arm1026_set_pte(ptep, pte) 350 * cpu_arm1026_set_pte_ext(ptep, pte, ext)
351 * 351 *
352 * Set a PTE and flush it out 352 * Set a PTE and flush it out
353 */ 353 */
354 .align 5 354 .align 5
355ENTRY(cpu_arm1026_set_pte) 355ENTRY(cpu_arm1026_set_pte_ext)
356#ifdef CONFIG_MMU 356#ifdef CONFIG_MMU
357 str r1, [r0], #-2048 @ linux version 357 str r1, [r0], #-2048 @ linux version
358 358
@@ -436,7 +436,7 @@ arm1026_processor_functions:
436 .word cpu_arm1026_do_idle 436 .word cpu_arm1026_do_idle
437 .word cpu_arm1026_dcache_clean_area 437 .word cpu_arm1026_dcache_clean_area
438 .word cpu_arm1026_switch_mm 438 .word cpu_arm1026_switch_mm
439 .word cpu_arm1026_set_pte 439 .word cpu_arm1026_set_pte_ext
440 .size arm1026_processor_functions, . - arm1026_processor_functions 440 .size arm1026_processor_functions, . - arm1026_processor_functions
441 441
442 .section .rodata 442 .section .rodata
diff --git a/arch/arm/mm/proc-arm6_7.S b/arch/arm/mm/proc-arm6_7.S
index 0432e4806888..123a7dc7a433 100644
--- a/arch/arm/mm/proc-arm6_7.S
+++ b/arch/arm/mm/proc-arm6_7.S
@@ -15,9 +15,9 @@
15#include <linux/init.h> 15#include <linux/init.h>
16#include <asm/assembler.h> 16#include <asm/assembler.h>
17#include <asm/asm-offsets.h> 17#include <asm/asm-offsets.h>
18#include <asm/elf.h>
18#include <asm/pgtable-hwdef.h> 19#include <asm/pgtable-hwdef.h>
19#include <asm/pgtable.h> 20#include <asm/pgtable.h>
20#include <asm/procinfo.h>
21#include <asm/ptrace.h> 21#include <asm/ptrace.h>
22 22
23ENTRY(cpu_arm6_dcache_clean_area) 23ENTRY(cpu_arm6_dcache_clean_area)
@@ -209,14 +209,14 @@ ENTRY(cpu_arm7_switch_mm)
209 mov pc, lr 209 mov pc, lr
210 210
211/* 211/*
212 * Function: arm6_7_set_pte(pte_t *ptep, pte_t pte) 212 * Function: arm6_7_set_pte_ext(pte_t *ptep, pte_t pte, unsigned int ext)
213 * Params : r0 = Address to set 213 * Params : r0 = Address to set
214 * : r1 = value to set 214 * : r1 = value to set
215 * Purpose : Set a PTE and flush it out of any WB cache 215 * Purpose : Set a PTE and flush it out of any WB cache
216 */ 216 */
217 .align 5 217 .align 5
218ENTRY(cpu_arm6_set_pte) 218ENTRY(cpu_arm6_set_pte_ext)
219ENTRY(cpu_arm7_set_pte) 219ENTRY(cpu_arm7_set_pte_ext)
220#ifdef CONFIG_MMU 220#ifdef CONFIG_MMU
221 str r1, [r0], #-2048 @ linux version 221 str r1, [r0], #-2048 @ linux version
222 222
@@ -299,7 +299,7 @@ ENTRY(arm6_processor_functions)
299 .word cpu_arm6_do_idle 299 .word cpu_arm6_do_idle
300 .word cpu_arm6_dcache_clean_area 300 .word cpu_arm6_dcache_clean_area
301 .word cpu_arm6_switch_mm 301 .word cpu_arm6_switch_mm
302 .word cpu_arm6_set_pte 302 .word cpu_arm6_set_pte_ext
303 .size arm6_processor_functions, . - arm6_processor_functions 303 .size arm6_processor_functions, . - arm6_processor_functions
304 304
305/* 305/*
@@ -315,7 +315,7 @@ ENTRY(arm7_processor_functions)
315 .word cpu_arm7_do_idle 315 .word cpu_arm7_do_idle
316 .word cpu_arm7_dcache_clean_area 316 .word cpu_arm7_dcache_clean_area
317 .word cpu_arm7_switch_mm 317 .word cpu_arm7_switch_mm
318 .word cpu_arm7_set_pte 318 .word cpu_arm7_set_pte_ext
319 .size arm7_processor_functions, . - arm7_processor_functions 319 .size arm7_processor_functions, . - arm7_processor_functions
320 320
321 .section ".rodata" 321 .section ".rodata"
diff --git a/arch/arm/mm/proc-arm720.S b/arch/arm/mm/proc-arm720.S
index c2f0705bfd49..dc763be43362 100644
--- a/arch/arm/mm/proc-arm720.S
+++ b/arch/arm/mm/proc-arm720.S
@@ -36,9 +36,9 @@
36#include <linux/init.h> 36#include <linux/init.h>
37#include <asm/assembler.h> 37#include <asm/assembler.h>
38#include <asm/asm-offsets.h> 38#include <asm/asm-offsets.h>
39#include <asm/elf.h>
39#include <asm/pgtable-hwdef.h> 40#include <asm/pgtable-hwdef.h>
40#include <asm/pgtable.h> 41#include <asm/pgtable.h>
41#include <asm/procinfo.h>
42#include <asm/ptrace.h> 42#include <asm/ptrace.h>
43 43
44#include "proc-macros.S" 44#include "proc-macros.S"
@@ -88,13 +88,13 @@ ENTRY(cpu_arm720_switch_mm)
88 mov pc, lr 88 mov pc, lr
89 89
90/* 90/*
91 * Function: arm720_set_pte(pte_t *ptep, pte_t pte) 91 * Function: arm720_set_pte_ext(pte_t *ptep, pte_t pte, unsigned int ext)
92 * Params : r0 = Address to set 92 * Params : r0 = Address to set
93 * : r1 = value to set 93 * : r1 = value to set
94 * Purpose : Set a PTE and flush it out of any WB cache 94 * Purpose : Set a PTE and flush it out of any WB cache
95 */ 95 */
96 .align 5 96 .align 5
97ENTRY(cpu_arm720_set_pte) 97ENTRY(cpu_arm720_set_pte_ext)
98#ifdef CONFIG_MMU 98#ifdef CONFIG_MMU
99 str r1, [r0], #-2048 @ linux version 99 str r1, [r0], #-2048 @ linux version
100 100
@@ -204,7 +204,7 @@ ENTRY(arm720_processor_functions)
204 .word cpu_arm720_do_idle 204 .word cpu_arm720_do_idle
205 .word cpu_arm720_dcache_clean_area 205 .word cpu_arm720_dcache_clean_area
206 .word cpu_arm720_switch_mm 206 .word cpu_arm720_switch_mm
207 .word cpu_arm720_set_pte 207 .word cpu_arm720_set_pte_ext
208 .size arm720_processor_functions, . - arm720_processor_functions 208 .size arm720_processor_functions, . - arm720_processor_functions
209 209
210 .section ".rodata" 210 .section ".rodata"
diff --git a/arch/arm/mm/proc-arm740.S b/arch/arm/mm/proc-arm740.S
index 40713818a87b..7069f495cf9b 100644
--- a/arch/arm/mm/proc-arm740.S
+++ b/arch/arm/mm/proc-arm740.S
@@ -12,9 +12,9 @@
12#include <linux/init.h> 12#include <linux/init.h>
13#include <asm/assembler.h> 13#include <asm/assembler.h>
14#include <asm/asm-offsets.h> 14#include <asm/asm-offsets.h>
15#include <asm/elf.h>
15#include <asm/pgtable-hwdef.h> 16#include <asm/pgtable-hwdef.h>
16#include <asm/pgtable.h> 17#include <asm/pgtable.h>
17#include <asm/procinfo.h>
18#include <asm/ptrace.h> 18#include <asm/ptrace.h>
19 19
20 .text 20 .text
diff --git a/arch/arm/mm/proc-arm7tdmi.S b/arch/arm/mm/proc-arm7tdmi.S
index 22d7e3100ea6..d091c2571823 100644
--- a/arch/arm/mm/proc-arm7tdmi.S
+++ b/arch/arm/mm/proc-arm7tdmi.S
@@ -12,9 +12,9 @@
12#include <linux/init.h> 12#include <linux/init.h>
13#include <asm/assembler.h> 13#include <asm/assembler.h>
14#include <asm/asm-offsets.h> 14#include <asm/asm-offsets.h>
15#include <asm/elf.h>
15#include <asm/pgtable-hwdef.h> 16#include <asm/pgtable-hwdef.h>
16#include <asm/pgtable.h> 17#include <asm/pgtable.h>
17#include <asm/procinfo.h>
18#include <asm/ptrace.h> 18#include <asm/ptrace.h>
19 19
20 .text 20 .text
diff --git a/arch/arm/mm/proc-arm920.S b/arch/arm/mm/proc-arm920.S
index 4adb46b3a4e0..75c945ed6c4d 100644
--- a/arch/arm/mm/proc-arm920.S
+++ b/arch/arm/mm/proc-arm920.S
@@ -28,9 +28,9 @@
28#include <linux/linkage.h> 28#include <linux/linkage.h>
29#include <linux/init.h> 29#include <linux/init.h>
30#include <asm/assembler.h> 30#include <asm/assembler.h>
31#include <asm/elf.h>
31#include <asm/pgtable-hwdef.h> 32#include <asm/pgtable-hwdef.h>
32#include <asm/pgtable.h> 33#include <asm/pgtable.h>
33#include <asm/procinfo.h>
34#include <asm/page.h> 34#include <asm/page.h>
35#include <asm/ptrace.h> 35#include <asm/ptrace.h>
36#include "proc-macros.S" 36#include "proc-macros.S"
@@ -344,12 +344,12 @@ ENTRY(cpu_arm920_switch_mm)
344 mov pc, lr 344 mov pc, lr
345 345
346/* 346/*
347 * cpu_arm920_set_pte(ptep, pte) 347 * cpu_arm920_set_pte(ptep, pte, ext)
348 * 348 *
349 * Set a PTE and flush it out 349 * Set a PTE and flush it out
350 */ 350 */
351 .align 5 351 .align 5
352ENTRY(cpu_arm920_set_pte) 352ENTRY(cpu_arm920_set_pte_ext)
353#ifdef CONFIG_MMU 353#ifdef CONFIG_MMU
354 str r1, [r0], #-2048 @ linux version 354 str r1, [r0], #-2048 @ linux version
355 355
@@ -423,7 +423,7 @@ arm920_processor_functions:
423 .word cpu_arm920_do_idle 423 .word cpu_arm920_do_idle
424 .word cpu_arm920_dcache_clean_area 424 .word cpu_arm920_dcache_clean_area
425 .word cpu_arm920_switch_mm 425 .word cpu_arm920_switch_mm
426 .word cpu_arm920_set_pte 426 .word cpu_arm920_set_pte_ext
427 .size arm920_processor_functions, . - arm920_processor_functions 427 .size arm920_processor_functions, . - arm920_processor_functions
428 428
429 .section ".rodata" 429 .section ".rodata"
diff --git a/arch/arm/mm/proc-arm922.S b/arch/arm/mm/proc-arm922.S
index 571f082f0247..ffb751b877ff 100644
--- a/arch/arm/mm/proc-arm922.S
+++ b/arch/arm/mm/proc-arm922.S
@@ -29,9 +29,9 @@
29#include <linux/linkage.h> 29#include <linux/linkage.h>
30#include <linux/init.h> 30#include <linux/init.h>
31#include <asm/assembler.h> 31#include <asm/assembler.h>
32#include <asm/elf.h>
32#include <asm/pgtable-hwdef.h> 33#include <asm/pgtable-hwdef.h>
33#include <asm/pgtable.h> 34#include <asm/pgtable.h>
34#include <asm/procinfo.h>
35#include <asm/page.h> 35#include <asm/page.h>
36#include <asm/ptrace.h> 36#include <asm/ptrace.h>
37#include "proc-macros.S" 37#include "proc-macros.S"
@@ -348,12 +348,12 @@ ENTRY(cpu_arm922_switch_mm)
348 mov pc, lr 348 mov pc, lr
349 349
350/* 350/*
351 * cpu_arm922_set_pte(ptep, pte) 351 * cpu_arm922_set_pte_ext(ptep, pte, ext)
352 * 352 *
353 * Set a PTE and flush it out 353 * Set a PTE and flush it out
354 */ 354 */
355 .align 5 355 .align 5
356ENTRY(cpu_arm922_set_pte) 356ENTRY(cpu_arm922_set_pte_ext)
357#ifdef CONFIG_MMU 357#ifdef CONFIG_MMU
358 str r1, [r0], #-2048 @ linux version 358 str r1, [r0], #-2048 @ linux version
359 359
@@ -427,7 +427,7 @@ arm922_processor_functions:
427 .word cpu_arm922_do_idle 427 .word cpu_arm922_do_idle
428 .word cpu_arm922_dcache_clean_area 428 .word cpu_arm922_dcache_clean_area
429 .word cpu_arm922_switch_mm 429 .word cpu_arm922_switch_mm
430 .word cpu_arm922_set_pte 430 .word cpu_arm922_set_pte_ext
431 .size arm922_processor_functions, . - arm922_processor_functions 431 .size arm922_processor_functions, . - arm922_processor_functions
432 432
433 .section ".rodata" 433 .section ".rodata"
diff --git a/arch/arm/mm/proc-arm925.S b/arch/arm/mm/proc-arm925.S
index 8d9a9f93b011..44c2c997819f 100644
--- a/arch/arm/mm/proc-arm925.S
+++ b/arch/arm/mm/proc-arm925.S
@@ -52,9 +52,9 @@
52#include <linux/linkage.h> 52#include <linux/linkage.h>
53#include <linux/init.h> 53#include <linux/init.h>
54#include <asm/assembler.h> 54#include <asm/assembler.h>
55#include <asm/elf.h>
55#include <asm/pgtable-hwdef.h> 56#include <asm/pgtable-hwdef.h>
56#include <asm/pgtable.h> 57#include <asm/pgtable.h>
57#include <asm/procinfo.h>
58#include <asm/page.h> 58#include <asm/page.h>
59#include <asm/ptrace.h> 59#include <asm/ptrace.h>
60#include "proc-macros.S" 60#include "proc-macros.S"
@@ -391,12 +391,12 @@ ENTRY(cpu_arm925_switch_mm)
391 mov pc, lr 391 mov pc, lr
392 392
393/* 393/*
394 * cpu_arm925_set_pte(ptep, pte) 394 * cpu_arm925_set_pte_ext(ptep, pte, ext)
395 * 395 *
396 * Set a PTE and flush it out 396 * Set a PTE and flush it out
397 */ 397 */
398 .align 5 398 .align 5
399ENTRY(cpu_arm925_set_pte) 399ENTRY(cpu_arm925_set_pte_ext)
400#ifdef CONFIG_MMU 400#ifdef CONFIG_MMU
401 str r1, [r0], #-2048 @ linux version 401 str r1, [r0], #-2048 @ linux version
402 402
@@ -490,7 +490,7 @@ arm925_processor_functions:
490 .word cpu_arm925_do_idle 490 .word cpu_arm925_do_idle
491 .word cpu_arm925_dcache_clean_area 491 .word cpu_arm925_dcache_clean_area
492 .word cpu_arm925_switch_mm 492 .word cpu_arm925_switch_mm
493 .word cpu_arm925_set_pte 493 .word cpu_arm925_set_pte_ext
494 .size arm925_processor_functions, . - arm925_processor_functions 494 .size arm925_processor_functions, . - arm925_processor_functions
495 495
496 .section ".rodata" 496 .section ".rodata"
diff --git a/arch/arm/mm/proc-arm926.S b/arch/arm/mm/proc-arm926.S
index 44a7a652d625..5b80b6bdd0cb 100644
--- a/arch/arm/mm/proc-arm926.S
+++ b/arch/arm/mm/proc-arm926.S
@@ -28,9 +28,9 @@
28#include <linux/linkage.h> 28#include <linux/linkage.h>
29#include <linux/init.h> 29#include <linux/init.h>
30#include <asm/assembler.h> 30#include <asm/assembler.h>
31#include <asm/elf.h>
31#include <asm/pgtable-hwdef.h> 32#include <asm/pgtable-hwdef.h>
32#include <asm/pgtable.h> 33#include <asm/pgtable.h>
33#include <asm/procinfo.h>
34#include <asm/page.h> 34#include <asm/page.h>
35#include <asm/ptrace.h> 35#include <asm/ptrace.h>
36#include "proc-macros.S" 36#include "proc-macros.S"
@@ -348,12 +348,12 @@ ENTRY(cpu_arm926_switch_mm)
348 mov pc, lr 348 mov pc, lr
349 349
350/* 350/*
351 * cpu_arm926_set_pte(ptep, pte) 351 * cpu_arm926_set_pte_ext(ptep, pte, ext)
352 * 352 *
353 * Set a PTE and flush it out 353 * Set a PTE and flush it out
354 */ 354 */
355 .align 5 355 .align 5
356ENTRY(cpu_arm926_set_pte) 356ENTRY(cpu_arm926_set_pte_ext)
357#ifdef CONFIG_MMU 357#ifdef CONFIG_MMU
358 str r1, [r0], #-2048 @ linux version 358 str r1, [r0], #-2048 @ linux version
359 359
@@ -439,7 +439,7 @@ arm926_processor_functions:
439 .word cpu_arm926_do_idle 439 .word cpu_arm926_do_idle
440 .word cpu_arm926_dcache_clean_area 440 .word cpu_arm926_dcache_clean_area
441 .word cpu_arm926_switch_mm 441 .word cpu_arm926_switch_mm
442 .word cpu_arm926_set_pte 442 .word cpu_arm926_set_pte_ext
443 .size arm926_processor_functions, . - arm926_processor_functions 443 .size arm926_processor_functions, . - arm926_processor_functions
444 444
445 .section ".rodata" 445 .section ".rodata"
@@ -480,7 +480,7 @@ __arm926_proc_info:
480 b __arm926_setup 480 b __arm926_setup
481 .long cpu_arch_name 481 .long cpu_arch_name
482 .long cpu_elf_name 482 .long cpu_elf_name
483 .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_VFP|HWCAP_EDSP|HWCAP_JAVA 483 .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP|HWCAP_JAVA
484 .long cpu_arm926_name 484 .long cpu_arm926_name
485 .long arm926_processor_functions 485 .long arm926_processor_functions
486 .long v4wbi_tlb_fns 486 .long v4wbi_tlb_fns
diff --git a/arch/arm/mm/proc-arm940.S b/arch/arm/mm/proc-arm940.S
index 2397f4b6e151..786c593778f0 100644
--- a/arch/arm/mm/proc-arm940.S
+++ b/arch/arm/mm/proc-arm940.S
@@ -11,9 +11,9 @@
11#include <linux/linkage.h> 11#include <linux/linkage.h>
12#include <linux/init.h> 12#include <linux/init.h>
13#include <asm/assembler.h> 13#include <asm/assembler.h>
14#include <asm/elf.h>
14#include <asm/pgtable-hwdef.h> 15#include <asm/pgtable-hwdef.h>
15#include <asm/pgtable.h> 16#include <asm/pgtable.h>
16#include <asm/procinfo.h>
17#include <asm/ptrace.h> 17#include <asm/ptrace.h>
18 18
19/* ARM940T has a 4KB DCache comprising 256 lines of 4 words */ 19/* ARM940T has a 4KB DCache comprising 256 lines of 4 words */
diff --git a/arch/arm/mm/proc-arm946.S b/arch/arm/mm/proc-arm946.S
index e18617564421..a60c1421d450 100644
--- a/arch/arm/mm/proc-arm946.S
+++ b/arch/arm/mm/proc-arm946.S
@@ -13,9 +13,9 @@
13#include <linux/linkage.h> 13#include <linux/linkage.h>
14#include <linux/init.h> 14#include <linux/init.h>
15#include <asm/assembler.h> 15#include <asm/assembler.h>
16#include <asm/elf.h>
16#include <asm/pgtable-hwdef.h> 17#include <asm/pgtable-hwdef.h>
17#include <asm/pgtable.h> 18#include <asm/pgtable.h>
18#include <asm/procinfo.h>
19#include <asm/ptrace.h> 19#include <asm/ptrace.h>
20 20
21/* 21/*
diff --git a/arch/arm/mm/proc-arm9tdmi.S b/arch/arm/mm/proc-arm9tdmi.S
index 918ebf65d4f6..4848eeac86b6 100644
--- a/arch/arm/mm/proc-arm9tdmi.S
+++ b/arch/arm/mm/proc-arm9tdmi.S
@@ -12,9 +12,9 @@
12#include <linux/init.h> 12#include <linux/init.h>
13#include <asm/assembler.h> 13#include <asm/assembler.h>
14#include <asm/asm-offsets.h> 14#include <asm/asm-offsets.h>
15#include <asm/elf.h>
15#include <asm/pgtable-hwdef.h> 16#include <asm/pgtable-hwdef.h>
16#include <asm/pgtable.h> 17#include <asm/pgtable.h>
17#include <asm/procinfo.h>
18#include <asm/ptrace.h> 18#include <asm/ptrace.h>
19 19
20 .text 20 .text
diff --git a/arch/arm/mm/proc-sa110.S b/arch/arm/mm/proc-sa110.S
index c878064e9b88..6e226e12989f 100644
--- a/arch/arm/mm/proc-sa110.S
+++ b/arch/arm/mm/proc-sa110.S
@@ -17,7 +17,7 @@
17#include <linux/init.h> 17#include <linux/init.h>
18#include <asm/assembler.h> 18#include <asm/assembler.h>
19#include <asm/asm-offsets.h> 19#include <asm/asm-offsets.h>
20#include <asm/procinfo.h> 20#include <asm/elf.h>
21#include <asm/hardware.h> 21#include <asm/hardware.h>
22#include <asm/pgtable-hwdef.h> 22#include <asm/pgtable-hwdef.h>
23#include <asm/pgtable.h> 23#include <asm/pgtable.h>
@@ -146,12 +146,12 @@ ENTRY(cpu_sa110_switch_mm)
146#endif 146#endif
147 147
148/* 148/*
149 * cpu_sa110_set_pte(ptep, pte) 149 * cpu_sa110_set_pte_ext(ptep, pte, ext)
150 * 150 *
151 * Set a PTE and flush it out 151 * Set a PTE and flush it out
152 */ 152 */
153 .align 5 153 .align 5
154ENTRY(cpu_sa110_set_pte) 154ENTRY(cpu_sa110_set_pte_ext)
155#ifdef CONFIG_MMU 155#ifdef CONFIG_MMU
156 str r1, [r0], #-2048 @ linux version 156 str r1, [r0], #-2048 @ linux version
157 157
@@ -222,7 +222,7 @@ ENTRY(sa110_processor_functions)
222 .word cpu_sa110_do_idle 222 .word cpu_sa110_do_idle
223 .word cpu_sa110_dcache_clean_area 223 .word cpu_sa110_dcache_clean_area
224 .word cpu_sa110_switch_mm 224 .word cpu_sa110_switch_mm
225 .word cpu_sa110_set_pte 225 .word cpu_sa110_set_pte_ext
226 .size sa110_processor_functions, . - sa110_processor_functions 226 .size sa110_processor_functions, . - sa110_processor_functions
227 227
228 .section ".rodata" 228 .section ".rodata"
diff --git a/arch/arm/mm/proc-sa1100.S b/arch/arm/mm/proc-sa1100.S
index b23b66a6155a..9afb11d089fe 100644
--- a/arch/arm/mm/proc-sa1100.S
+++ b/arch/arm/mm/proc-sa1100.S
@@ -22,7 +22,7 @@
22#include <linux/init.h> 22#include <linux/init.h>
23#include <asm/assembler.h> 23#include <asm/assembler.h>
24#include <asm/asm-offsets.h> 24#include <asm/asm-offsets.h>
25#include <asm/procinfo.h> 25#include <asm/elf.h>
26#include <asm/hardware.h> 26#include <asm/hardware.h>
27#include <asm/pgtable-hwdef.h> 27#include <asm/pgtable-hwdef.h>
28#include <asm/pgtable.h> 28#include <asm/pgtable.h>
@@ -159,12 +159,12 @@ ENTRY(cpu_sa1100_switch_mm)
159#endif 159#endif
160 160
161/* 161/*
162 * cpu_sa1100_set_pte(ptep, pte) 162 * cpu_sa1100_set_pte_ext(ptep, pte, ext)
163 * 163 *
164 * Set a PTE and flush it out 164 * Set a PTE and flush it out
165 */ 165 */
166 .align 5 166 .align 5
167ENTRY(cpu_sa1100_set_pte) 167ENTRY(cpu_sa1100_set_pte_ext)
168#ifdef CONFIG_MMU 168#ifdef CONFIG_MMU
169 str r1, [r0], #-2048 @ linux version 169 str r1, [r0], #-2048 @ linux version
170 170
@@ -237,7 +237,7 @@ ENTRY(sa1100_processor_functions)
237 .word cpu_sa1100_do_idle 237 .word cpu_sa1100_do_idle
238 .word cpu_sa1100_dcache_clean_area 238 .word cpu_sa1100_dcache_clean_area
239 .word cpu_sa1100_switch_mm 239 .word cpu_sa1100_switch_mm
240 .word cpu_sa1100_set_pte 240 .word cpu_sa1100_set_pte_ext
241 .size sa1100_processor_functions, . - sa1100_processor_functions 241 .size sa1100_processor_functions, . - sa1100_processor_functions
242 242
243 .section ".rodata" 243 .section ".rodata"
diff --git a/arch/arm/mm/proc-syms.c b/arch/arm/mm/proc-syms.c
index ab143557e688..9f396b4fa0b7 100644
--- a/arch/arm/mm/proc-syms.c
+++ b/arch/arm/mm/proc-syms.c
@@ -17,7 +17,7 @@
17 17
18#ifndef MULTI_CPU 18#ifndef MULTI_CPU
19EXPORT_SYMBOL(cpu_dcache_clean_area); 19EXPORT_SYMBOL(cpu_dcache_clean_area);
20EXPORT_SYMBOL(cpu_set_pte); 20EXPORT_SYMBOL(cpu_set_pte_ext);
21#else 21#else
22EXPORT_SYMBOL(processor); 22EXPORT_SYMBOL(processor);
23#endif 23#endif
diff --git a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S
index 6f72549f8843..7b1843befb9c 100644
--- a/arch/arm/mm/proc-v6.S
+++ b/arch/arm/mm/proc-v6.S
@@ -13,8 +13,8 @@
13#include <linux/linkage.h> 13#include <linux/linkage.h>
14#include <asm/assembler.h> 14#include <asm/assembler.h>
15#include <asm/asm-offsets.h> 15#include <asm/asm-offsets.h>
16#include <asm/elf.h>
16#include <asm/hardware/arm_scu.h> 17#include <asm/hardware/arm_scu.h>
17#include <asm/procinfo.h>
18#include <asm/pgtable-hwdef.h> 18#include <asm/pgtable-hwdef.h>
19#include <asm/pgtable.h> 19#include <asm/pgtable.h>
20 20
@@ -103,13 +103,14 @@ ENTRY(cpu_v6_switch_mm)
103 mov pc, lr 103 mov pc, lr
104 104
105/* 105/*
106 * cpu_v6_set_pte(ptep, pte) 106 * cpu_v6_set_pte_ext(ptep, pte, ext)
107 * 107 *
108 * Set a level 2 translation table entry. 108 * Set a level 2 translation table entry.
109 * 109 *
110 * - ptep - pointer to level 2 translation table entry 110 * - ptep - pointer to level 2 translation table entry
111 * (hardware version is stored at -1024 bytes) 111 * (hardware version is stored at -1024 bytes)
112 * - pte - PTE value to store 112 * - pte - PTE value to store
113 * - ext - value for extended PTE bits
113 * 114 *
114 * Permissions: 115 * Permissions:
115 * YUWD APX AP1 AP0 SVC User 116 * YUWD APX AP1 AP0 SVC User
@@ -121,33 +122,34 @@ ENTRY(cpu_v6_switch_mm)
121 * 11x0 0 1 0 r/w r/o 122 * 11x0 0 1 0 r/w r/o
122 * 1111 0 1 1 r/w r/w 123 * 1111 0 1 1 r/w r/w
123 */ 124 */
124ENTRY(cpu_v6_set_pte) 125ENTRY(cpu_v6_set_pte_ext)
125#ifdef CONFIG_MMU 126#ifdef CONFIG_MMU
126 str r1, [r0], #-2048 @ linux version 127 str r1, [r0], #-2048 @ linux version
127 128
128 bic r2, r1, #0x000003f0 129 bic r3, r1, #0x000003f0
129 bic r2, r2, #0x00000003 130 bic r3, r3, #0x00000003
130 orr r2, r2, #PTE_EXT_AP0 | 2 131 orr r3, r3, r2
132 orr r3, r3, #PTE_EXT_AP0 | 2
131 133
132 tst r1, #L_PTE_WRITE 134 tst r1, #L_PTE_WRITE
133 tstne r1, #L_PTE_DIRTY 135 tstne r1, #L_PTE_DIRTY
134 orreq r2, r2, #PTE_EXT_APX 136 orreq r3, r3, #PTE_EXT_APX
135 137
136 tst r1, #L_PTE_USER 138 tst r1, #L_PTE_USER
137 orrne r2, r2, #PTE_EXT_AP1 139 orrne r3, r3, #PTE_EXT_AP1
138 tstne r2, #PTE_EXT_APX 140 tstne r3, #PTE_EXT_APX
139 bicne r2, r2, #PTE_EXT_APX | PTE_EXT_AP0 141 bicne r3, r3, #PTE_EXT_APX | PTE_EXT_AP0
140 142
141 tst r1, #L_PTE_YOUNG 143 tst r1, #L_PTE_YOUNG
142 biceq r2, r2, #PTE_EXT_APX | PTE_EXT_AP_MASK 144 biceq r3, r3, #PTE_EXT_APX | PTE_EXT_AP_MASK
143 145
144 tst r1, #L_PTE_EXEC 146 tst r1, #L_PTE_EXEC
145 orreq r2, r2, #PTE_EXT_XN 147 orreq r3, r3, #PTE_EXT_XN
146 148
147 tst r1, #L_PTE_PRESENT 149 tst r1, #L_PTE_PRESENT
148 moveq r2, #0 150 moveq r3, #0
149 151
150 str r2, [r0] 152 str r3, [r0]
151 mcr p15, 0, r0, c7, c10, 1 @ flush_pte 153 mcr p15, 0, r0, c7, c10, 1 @ flush_pte
152#endif 154#endif
153 mov pc, lr 155 mov pc, lr
@@ -156,7 +158,7 @@ ENTRY(cpu_v6_set_pte)
156 158
157 159
158cpu_v6_name: 160cpu_v6_name:
159 .asciz "Some Random V6 Processor" 161 .asciz "ARMv6-compatible processor"
160 .align 162 .align
161 163
162 .section ".text.init", #alloc, #execinstr 164 .section ".text.init", #alloc, #execinstr
@@ -207,11 +209,6 @@ __v6_setup:
207#endif 209#endif
208 mcr p15, 0, r4, c2, c0, 1 @ load TTB1 210 mcr p15, 0, r4, c2, c0, 1 @ load TTB1
209#endif /* CONFIG_MMU */ 211#endif /* CONFIG_MMU */
210#ifdef CONFIG_VFP
211 mrc p15, 0, r0, c1, c0, 2
212 orr r0, r0, #(0xf << 20)
213 mcr p15, 0, r0, c1, c0, 2 @ Enable full access to VFP
214#endif
215 adr r5, v6_crval 212 adr r5, v6_crval
216 ldmia r5, {r5, r6} 213 ldmia r5, {r5, r6}
217 mrc p15, 0, r0, c1, c0, 0 @ read control register 214 mrc p15, 0, r0, c1, c0, 0 @ read control register
@@ -238,7 +235,7 @@ ENTRY(v6_processor_functions)
238 .word cpu_v6_do_idle 235 .word cpu_v6_do_idle
239 .word cpu_v6_dcache_clean_area 236 .word cpu_v6_dcache_clean_area
240 .word cpu_v6_switch_mm 237 .word cpu_v6_switch_mm
241 .word cpu_v6_set_pte 238 .word cpu_v6_set_pte_ext
242 .size v6_processor_functions, . - v6_processor_functions 239 .size v6_processor_functions, . - v6_processor_functions
243 240
244 .type cpu_arch_name, #object 241 .type cpu_arch_name, #object
@@ -273,7 +270,7 @@ __v6_proc_info:
273 b __v6_setup 270 b __v6_setup
274 .long cpu_arch_name 271 .long cpu_arch_name
275 .long cpu_elf_name 272 .long cpu_elf_name
276 .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_VFP|HWCAP_EDSP|HWCAP_JAVA 273 .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP|HWCAP_JAVA
277 .long cpu_v6_name 274 .long cpu_v6_name
278 .long v6_processor_functions 275 .long v6_processor_functions
279 .long v6wbi_tlb_fns 276 .long v6wbi_tlb_fns
diff --git a/arch/arm/mm/proc-xsc3.S b/arch/arm/mm/proc-xsc3.S
index 4ace2d8090c7..94a58455f346 100644
--- a/arch/arm/mm/proc-xsc3.S
+++ b/arch/arm/mm/proc-xsc3.S
@@ -2,7 +2,7 @@
2 * linux/arch/arm/mm/proc-xsc3.S 2 * linux/arch/arm/mm/proc-xsc3.S
3 * 3 *
4 * Original Author: Matthew Gilbert 4 * Original Author: Matthew Gilbert
5 * Current Maintainer: Deepak Saxena <dsaxena@plexity.net> 5 * Current Maintainer: Lennert Buytenhek <buytenh@wantstofly.org>
6 * 6 *
7 * Copyright 2004 (C) Intel Corp. 7 * Copyright 2004 (C) Intel Corp.
8 * Copyright 2005 (c) MontaVista Software, Inc. 8 * Copyright 2005 (c) MontaVista Software, Inc.
@@ -27,7 +27,7 @@
27#include <linux/linkage.h> 27#include <linux/linkage.h>
28#include <linux/init.h> 28#include <linux/init.h>
29#include <asm/assembler.h> 29#include <asm/assembler.h>
30#include <asm/procinfo.h> 30#include <asm/elf.h>
31#include <asm/hardware.h> 31#include <asm/hardware.h>
32#include <asm/pgtable.h> 32#include <asm/pgtable.h>
33#include <asm/pgtable-hwdef.h> 33#include <asm/pgtable-hwdef.h>
@@ -57,11 +57,6 @@
57#define L2_CACHE_ENABLE 1 57#define L2_CACHE_ENABLE 1
58 58
59/* 59/*
60 * Enable the Branch Target Buffer (can cause crashes, see erratum #42.)
61 */
62#define BTB_ENABLE 0
63
64/*
65 * This macro is used to wait for a CP15 write and is needed 60 * This macro is used to wait for a CP15 write and is needed
66 * when we have to ensure that the last operation to the co-pro 61 * when we have to ensure that the last operation to the co-pro
67 * was completed before continuing with operation. 62 * was completed before continuing with operation.
@@ -362,17 +357,19 @@ ENTRY(cpu_xsc3_switch_mm)
362 cpwait_ret lr, ip 357 cpwait_ret lr, ip
363 358
364/* 359/*
365 * cpu_xsc3_set_pte(ptep, pte) 360 * cpu_xsc3_set_pte_ext(ptep, pte, ext)
366 * 361 *
367 * Set a PTE and flush it out 362 * Set a PTE and flush it out
368 * 363 *
369 */ 364 */
370 .align 5 365 .align 5
371ENTRY(cpu_xsc3_set_pte) 366ENTRY(cpu_xsc3_set_pte_ext)
372 str r1, [r0], #-2048 @ linux version 367 str r1, [r0], #-2048 @ linux version
373 368
374 bic r2, r1, #0xdf0 @ Keep C, B, coherency bits 369 bic r2, r1, #0xff0 @ Keep C, B bits
375 orr r2, r2, #PTE_TYPE_EXT @ extended page 370 orr r2, r2, #PTE_TYPE_EXT @ extended page
371 tst r1, #L_PTE_SHARED @ Shared?
372 orrne r2, r2, #0x200
376 373
377 eor r3, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY 374 eor r3, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
378 375
@@ -432,9 +429,7 @@ __xsc3_setup:
432 mrc p15, 0, r0, c1, c0, 0 @ get control register 429 mrc p15, 0, r0, c1, c0, 0 @ get control register
433 bic r0, r0, r5 @ .... .... .... ..A. 430 bic r0, r0, r5 @ .... .... .... ..A.
434 orr r0, r0, r6 @ .... .... .... .C.M 431 orr r0, r0, r6 @ .... .... .... .C.M
435#if BTB_ENABLE
436 orr r0, r0, #0x00000800 @ ..VI Z..S .... .... 432 orr r0, r0, #0x00000800 @ ..VI Z..S .... ....
437#endif
438#if L2_CACHE_ENABLE 433#if L2_CACHE_ENABLE
439 orr r0, r0, #0x04000000 @ L2 enable 434 orr r0, r0, #0x04000000 @ L2 enable
440#endif 435#endif
@@ -462,7 +457,7 @@ ENTRY(xsc3_processor_functions)
462 .word cpu_xsc3_do_idle 457 .word cpu_xsc3_do_idle
463 .word cpu_xsc3_dcache_clean_area 458 .word cpu_xsc3_dcache_clean_area
464 .word cpu_xsc3_switch_mm 459 .word cpu_xsc3_switch_mm
465 .word cpu_xsc3_set_pte 460 .word cpu_xsc3_set_pte_ext
466 .size xsc3_processor_functions, . - xsc3_processor_functions 461 .size xsc3_processor_functions, . - xsc3_processor_functions
467 462
468 .section ".rodata" 463 .section ".rodata"
diff --git a/arch/arm/mm/proc-xscale.S b/arch/arm/mm/proc-xscale.S
index 2749c1f88d7d..490e11b34231 100644
--- a/arch/arm/mm/proc-xscale.S
+++ b/arch/arm/mm/proc-xscale.S
@@ -23,7 +23,7 @@
23#include <linux/linkage.h> 23#include <linux/linkage.h>
24#include <linux/init.h> 24#include <linux/init.h>
25#include <asm/assembler.h> 25#include <asm/assembler.h>
26#include <asm/procinfo.h> 26#include <asm/elf.h>
27#include <asm/pgtable.h> 27#include <asm/pgtable.h>
28#include <asm/pgtable-hwdef.h> 28#include <asm/pgtable-hwdef.h>
29#include <asm/page.h> 29#include <asm/page.h>
@@ -421,14 +421,14 @@ ENTRY(cpu_xscale_switch_mm)
421 cpwait_ret lr, ip 421 cpwait_ret lr, ip
422 422
423/* 423/*
424 * cpu_xscale_set_pte(ptep, pte) 424 * cpu_xscale_set_pte_ext(ptep, pte, ext)
425 * 425 *
426 * Set a PTE and flush it out 426 * Set a PTE and flush it out
427 * 427 *
428 * Errata 40: must set memory to write-through for user read-only pages. 428 * Errata 40: must set memory to write-through for user read-only pages.
429 */ 429 */
430 .align 5 430 .align 5
431ENTRY(cpu_xscale_set_pte) 431ENTRY(cpu_xscale_set_pte_ext)
432 str r1, [r0], #-2048 @ linux version 432 str r1, [r0], #-2048 @ linux version
433 433
434 bic r2, r1, #0xff0 434 bic r2, r1, #0xff0
@@ -491,12 +491,7 @@ __xscale_setup:
491 mcr p15, 0, ip, c7, c7, 0 @ invalidate I, D caches & BTB 491 mcr p15, 0, ip, c7, c7, 0 @ invalidate I, D caches & BTB
492 mcr p15, 0, ip, c7, c10, 4 @ Drain Write (& Fill) Buffer 492 mcr p15, 0, ip, c7, c10, 4 @ Drain Write (& Fill) Buffer
493 mcr p15, 0, ip, c8, c7, 0 @ invalidate I, D TLBs 493 mcr p15, 0, ip, c8, c7, 0 @ invalidate I, D TLBs
494#ifdef CONFIG_IWMMXT 494 mov r0, #1 << 6 @ cp6 for IOP3xx and Bulverde
495 mov r0, #0 @ initially disallow access to CP0/CP1
496#else
497 mov r0, #1 @ Allow access to CP0
498#endif
499 orr r0, r0, #1 << 6 @ cp6 for IOP3xx and Bulverde
500 orr r0, r0, #1 << 13 @ Its undefined whether this 495 orr r0, r0, #1 << 13 @ Its undefined whether this
501 mcr p15, 0, r0, c15, c1, 0 @ affects USR or SVC modes 496 mcr p15, 0, r0, c15, c1, 0 @ affects USR or SVC modes
502 497
@@ -534,7 +529,7 @@ ENTRY(xscale_processor_functions)
534 .word cpu_xscale_do_idle 529 .word cpu_xscale_do_idle
535 .word cpu_xscale_dcache_clean_area 530 .word cpu_xscale_dcache_clean_area
536 .word cpu_xscale_switch_mm 531 .word cpu_xscale_switch_mm
537 .word cpu_xscale_set_pte 532 .word cpu_xscale_set_pte_ext
538 .size xscale_processor_functions, . - xscale_processor_functions 533 .size xscale_processor_functions, . - xscale_processor_functions
539 534
540 .section ".rodata" 535 .section ".rodata"
@@ -909,7 +904,7 @@ __pxa270_proc_info:
909 b __xscale_setup 904 b __xscale_setup
910 .long cpu_arch_name 905 .long cpu_arch_name
911 .long cpu_elf_name 906 .long cpu_elf_name
912 .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP|HWCAP_IWMMXT 907 .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP
913 .long cpu_pxa270_name 908 .long cpu_pxa270_name
914 .long xscale_processor_functions 909 .long xscale_processor_functions
915 .long v4wbi_tlb_fns 910 .long v4wbi_tlb_fns