aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mm/consistent.c2
-rw-r--r--arch/arm/mm/copypage-v4mc.c2
-rw-r--r--arch/arm/mm/copypage-v6.c6
-rw-r--r--arch/arm/mm/copypage-xscale.c2
-rw-r--r--arch/arm/mm/fault-armv.c2
-rw-r--r--arch/arm/mm/flush.c2
-rw-r--r--arch/arm/mm/ioremap.c4
-rw-r--r--arch/arm/mm/mmu.c8
-rw-r--r--arch/arm/mm/pgd.c2
-rw-r--r--arch/arm/mm/proc-arm1020.S4
-rw-r--r--arch/arm/mm/proc-arm1020e.S4
-rw-r--r--arch/arm/mm/proc-arm1022.S6
-rw-r--r--arch/arm/mm/proc-arm1026.S6
-rw-r--r--arch/arm/mm/proc-arm6_7.S10
-rw-r--r--arch/arm/mm/proc-arm720.S6
-rw-r--r--arch/arm/mm/proc-arm920.S6
-rw-r--r--arch/arm/mm/proc-arm922.S6
-rw-r--r--arch/arm/mm/proc-arm925.S6
-rw-r--r--arch/arm/mm/proc-arm926.S6
-rw-r--r--arch/arm/mm/proc-sa110.S6
-rw-r--r--arch/arm/mm/proc-sa1100.S6
-rw-r--r--arch/arm/mm/proc-syms.c2
-rw-r--r--arch/arm/mm/proc-v6.S30
-rw-r--r--arch/arm/mm/proc-xsc3.S6
-rw-r--r--arch/arm/mm/proc-xscale.S6
25 files changed, 71 insertions, 75 deletions
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..408b05ae6b9b 100644
--- a/arch/arm/mm/copypage-v4mc.c
+++ b/arch/arm/mm/copypage-v4mc.c
@@ -71,7 +71,7 @@ void v4_mc_copy_user_page(void *kto, const void *kfrom, unsigned long vaddr)
71{ 71{
72 spin_lock(&minicache_lock); 72 spin_lock(&minicache_lock);
73 73
74 set_pte(TOP_PTE(0xffff8000), pfn_pte(__pa(kfrom) >> PAGE_SHIFT, minicache_pgprot)); 74 set_pte_ext(TOP_PTE(0xffff8000), pfn_pte(__pa(kfrom) >> PAGE_SHIFT, minicache_pgprot), 0);
75 flush_tlb_kernel_page(0xffff8000); 75 flush_tlb_kernel_page(0xffff8000);
76 76
77 mc_copy_user_page((void *)0xffff8000, kto); 77 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..865777dec161 100644
--- a/arch/arm/mm/copypage-v6.c
+++ b/arch/arm/mm/copypage-v6.c
@@ -70,8 +70,8 @@ static void v6_copy_user_page_aliasing(void *kto, const void *kfrom, unsigned lo
70 */ 70 */
71 spin_lock(&v6_lock); 71 spin_lock(&v6_lock);
72 72
73 set_pte(TOP_PTE(from_address) + offset, pfn_pte(__pa(kfrom) >> PAGE_SHIFT, PAGE_KERNEL)); 73 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)); 74 set_pte_ext(TOP_PTE(to_address) + offset, pfn_pte(__pa(kto) >> PAGE_SHIFT, PAGE_KERNEL), 0);
75 75
76 from = from_address + (offset << PAGE_SHIFT); 76 from = from_address + (offset << PAGE_SHIFT);
77 to = to_address + (offset << PAGE_SHIFT); 77 to = to_address + (offset << PAGE_SHIFT);
@@ -110,7 +110,7 @@ static void v6_clear_user_page_aliasing(void *kaddr, unsigned long vaddr)
110 */ 110 */
111 spin_lock(&v6_lock); 111 spin_lock(&v6_lock);
112 112
113 set_pte(TOP_PTE(to_address) + offset, pfn_pte(__pa(kaddr) >> PAGE_SHIFT, PAGE_KERNEL)); 113 set_pte_ext(TOP_PTE(to_address) + offset, pfn_pte(__pa(kaddr) >> PAGE_SHIFT, PAGE_KERNEL), 0);
114 flush_tlb_kernel_page(to); 114 flush_tlb_kernel_page(to);
115 clear_page((void *)to); 115 clear_page((void *)to);
116 116
diff --git a/arch/arm/mm/copypage-xscale.c b/arch/arm/mm/copypage-xscale.c
index 84ebe0aa379e..aea5da723596 100644
--- a/arch/arm/mm/copypage-xscale.c
+++ b/arch/arm/mm/copypage-xscale.c
@@ -93,7 +93,7 @@ void xscale_mc_copy_user_page(void *kto, const void *kfrom, unsigned long vaddr)
93{ 93{
94 spin_lock(&minicache_lock); 94 spin_lock(&minicache_lock);
95 95
96 set_pte(TOP_PTE(COPYPAGE_MINICACHE), pfn_pte(__pa(kfrom) >> PAGE_SHIFT, minicache_pgprot)); 96 set_pte_ext(TOP_PTE(COPYPAGE_MINICACHE), pfn_pte(__pa(kfrom) >> PAGE_SHIFT, minicache_pgprot), 0);
97 flush_tlb_kernel_page(COPYPAGE_MINICACHE); 97 flush_tlb_kernel_page(COPYPAGE_MINICACHE);
98 98
99 mc_copy_user_page((void *)COPYPAGE_MINICACHE, kto); 99 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/flush.c b/arch/arm/mm/flush.c
index 454205b789d5..628348c9f6c5 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"
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c
index 465440592791..a43d2800a9cd 100644
--- a/arch/arm/mm/ioremap.c
+++ b/arch/arm/mm/ioremap.c
@@ -40,7 +40,7 @@
40 40
41static inline void 41static inline void
42remap_area_pte(pte_t * pte, unsigned long address, unsigned long size, 42remap_area_pte(pte_t * pte, unsigned long address, unsigned long size,
43 unsigned long phys_addr, pgprot_t pgprot) 43 unsigned long phys_addr, pgprot_t prot)
44{ 44{
45 unsigned long end; 45 unsigned long end;
46 46
@@ -53,7 +53,7 @@ remap_area_pte(pte_t * pte, unsigned long address, unsigned long size,
53 if (!pte_none(*pte)) 53 if (!pte_none(*pte))
54 goto bad; 54 goto bad;
55 55
56 set_pte(pte, pfn_pte(phys_addr >> PAGE_SHIFT, pgprot)); 56 set_pte_ext(pte, pfn_pte(phys_addr >> PAGE_SHIFT, prot), 0);
57 address += PAGE_SIZE; 57 address += PAGE_SIZE;
58 phys_addr += PAGE_SIZE; 58 phys_addr += PAGE_SIZE;
59 pte++; 59 pte++;
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index b7f194af20b4..f028aef9a861 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -294,12 +294,6 @@ static void __init build_mem_type_table(void)
294 mem_types[MT_DEVICE].prot_pte |= L_PTE_BUFFERABLE; 294 mem_types[MT_DEVICE].prot_pte |= L_PTE_BUFFERABLE;
295 mem_types[MT_DEVICE].prot_sect |= PMD_SECT_BUFFERED; 295 mem_types[MT_DEVICE].prot_sect |= PMD_SECT_BUFFERED;
296 296
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 297#ifdef CONFIG_SMP
304 /* 298 /*
305 * Mark memory with the "shared" attribute for SMP systems 299 * Mark memory with the "shared" attribute for SMP systems
@@ -408,7 +402,7 @@ alloc_init_page(unsigned long virt, unsigned long phys, unsigned int prot_l1, pg
408 } 402 }
409 ptep = pte_offset_kernel(pmdp, virt); 403 ptep = pte_offset_kernel(pmdp, virt);
410 404
411 set_pte(ptep, pfn_pte(phys >> PAGE_SHIFT, prot)); 405 set_pte_ext(ptep, pfn_pte(phys >> PAGE_SHIFT, prot), 0);
412} 406}
413 407
414/* 408/*
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 289b8e6f504d..700c04d6996e 100644
--- a/arch/arm/mm/proc-arm1020.S
+++ b/arch/arm/mm/proc-arm1020.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 bed9db6ba582..1cc206ab5eae 100644
--- a/arch/arm/mm/proc-arm1020e.S
+++ b/arch/arm/mm/proc-arm1020e.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 d2a7c1b9cab9..aff0ea08e2f8 100644
--- a/arch/arm/mm/proc-arm1022.S
+++ b/arch/arm/mm/proc-arm1022.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 3247ce5c0177..65e43a109085 100644
--- a/arch/arm/mm/proc-arm1026.S
+++ b/arch/arm/mm/proc-arm1026.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 ce4f9eef763c..123a7dc7a433 100644
--- a/arch/arm/mm/proc-arm6_7.S
+++ b/arch/arm/mm/proc-arm6_7.S
@@ -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 c04c194da785..dc763be43362 100644
--- a/arch/arm/mm/proc-arm720.S
+++ b/arch/arm/mm/proc-arm720.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-arm920.S b/arch/arm/mm/proc-arm920.S
index 65cbb2851bff..75c945ed6c4d 100644
--- a/arch/arm/mm/proc-arm920.S
+++ b/arch/arm/mm/proc-arm920.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 52761b70d735..ffb751b877ff 100644
--- a/arch/arm/mm/proc-arm922.S
+++ b/arch/arm/mm/proc-arm922.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 5b74339d1588..44c2c997819f 100644
--- a/arch/arm/mm/proc-arm925.S
+++ b/arch/arm/mm/proc-arm925.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 080efac9d9ff..5b80b6bdd0cb 100644
--- a/arch/arm/mm/proc-arm926.S
+++ b/arch/arm/mm/proc-arm926.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"
diff --git a/arch/arm/mm/proc-sa110.S b/arch/arm/mm/proc-sa110.S
index cd7d865c9d19..6e226e12989f 100644
--- a/arch/arm/mm/proc-sa110.S
+++ b/arch/arm/mm/proc-sa110.S
@@ -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 b776653cc31c..9afb11d089fe 100644
--- a/arch/arm/mm/proc-sa1100.S
+++ b/arch/arm/mm/proc-sa1100.S
@@ -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 513c6c28256d..7b1843befb9c 100644
--- a/arch/arm/mm/proc-v6.S
+++ b/arch/arm/mm/proc-v6.S
@@ -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
@@ -233,7 +235,7 @@ ENTRY(v6_processor_functions)
233 .word cpu_v6_do_idle 235 .word cpu_v6_do_idle
234 .word cpu_v6_dcache_clean_area 236 .word cpu_v6_dcache_clean_area
235 .word cpu_v6_switch_mm 237 .word cpu_v6_switch_mm
236 .word cpu_v6_set_pte 238 .word cpu_v6_set_pte_ext
237 .size v6_processor_functions, . - v6_processor_functions 239 .size v6_processor_functions, . - v6_processor_functions
238 240
239 .type cpu_arch_name, #object 241 .type cpu_arch_name, #object
diff --git a/arch/arm/mm/proc-xsc3.S b/arch/arm/mm/proc-xsc3.S
index 1ef564d0957f..43494ae8f01a 100644
--- a/arch/arm/mm/proc-xsc3.S
+++ b/arch/arm/mm/proc-xsc3.S
@@ -357,13 +357,13 @@ ENTRY(cpu_xsc3_switch_mm)
357 cpwait_ret lr, ip 357 cpwait_ret lr, ip
358 358
359/* 359/*
360 * cpu_xsc3_set_pte(ptep, pte) 360 * cpu_xsc3_set_pte_ext(ptep, pte, ext)
361 * 361 *
362 * Set a PTE and flush it out 362 * Set a PTE and flush it out
363 * 363 *
364 */ 364 */
365 .align 5 365 .align 5
366ENTRY(cpu_xsc3_set_pte) 366ENTRY(cpu_xsc3_set_pte_ext)
367 str r1, [r0], #-2048 @ linux version 367 str r1, [r0], #-2048 @ linux version
368 368
369 bic r2, r1, #0xff0 @ Keep C, B bits 369 bic r2, r1, #0xff0 @ Keep C, B bits
@@ -457,7 +457,7 @@ ENTRY(xsc3_processor_functions)
457 .word cpu_xsc3_do_idle 457 .word cpu_xsc3_do_idle
458 .word cpu_xsc3_dcache_clean_area 458 .word cpu_xsc3_dcache_clean_area
459 .word cpu_xsc3_switch_mm 459 .word cpu_xsc3_switch_mm
460 .word cpu_xsc3_set_pte 460 .word cpu_xsc3_set_pte_ext
461 .size xsc3_processor_functions, . - xsc3_processor_functions 461 .size xsc3_processor_functions, . - xsc3_processor_functions
462 462
463 .section ".rodata" 463 .section ".rodata"
diff --git a/arch/arm/mm/proc-xscale.S b/arch/arm/mm/proc-xscale.S
index cc1004b3e511..490e11b34231 100644
--- a/arch/arm/mm/proc-xscale.S
+++ b/arch/arm/mm/proc-xscale.S
@@ -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
@@ -529,7 +529,7 @@ ENTRY(xscale_processor_functions)
529 .word cpu_xscale_do_idle 529 .word cpu_xscale_do_idle
530 .word cpu_xscale_dcache_clean_area 530 .word cpu_xscale_dcache_clean_area
531 .word cpu_xscale_switch_mm 531 .word cpu_xscale_switch_mm
532 .word cpu_xscale_set_pte 532 .word cpu_xscale_set_pte_ext
533 .size xscale_processor_functions, . - xscale_processor_functions 533 .size xscale_processor_functions, . - xscale_processor_functions
534 534
535 .section ".rodata" 535 .section ".rodata"