diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2008-10-09 16:31:56 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-10-09 16:31:56 -0400 |
commit | 6a4690c22f5da1eb1c898b61b6a80da52fbd976f (patch) | |
tree | a03891a32abe0da191fb765fe669a597e07423c6 /arch/arm/mm/fault-armv.c | |
parent | 90bb28b0644f7324f8bd1feb27b35146e6785ba2 (diff) | |
parent | 8ec53663d2698076468b3e1edc4e1b418bd54de3 (diff) |
Merge branch 'ptebits' into devel
Conflicts:
arch/arm/Kconfig
Diffstat (limited to 'arch/arm/mm/fault-armv.c')
-rw-r--r-- | arch/arm/mm/fault-armv.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/arm/mm/fault-armv.c b/arch/arm/mm/fault-armv.c index af6ed6ef9a81..81d0b8772de3 100644 --- a/arch/arm/mm/fault-armv.c +++ b/arch/arm/mm/fault-armv.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #include <asm/pgtable.h> | 23 | #include <asm/pgtable.h> |
24 | #include <asm/tlbflush.h> | 24 | #include <asm/tlbflush.h> |
25 | 25 | ||
26 | static unsigned long shared_pte_mask = L_PTE_CACHEABLE; | 26 | static unsigned long shared_pte_mask = L_PTE_MT_BUFFERABLE; |
27 | 27 | ||
28 | /* | 28 | /* |
29 | * We take the easy way out of this problem - we make the | 29 | * We take the easy way out of this problem - we make the |
@@ -65,9 +65,10 @@ static int adjust_pte(struct vm_area_struct *vma, unsigned long address) | |||
65 | * If this page isn't present, or is already setup to | 65 | * If this page isn't present, or is already setup to |
66 | * fault (ie, is old), we can safely ignore any issues. | 66 | * fault (ie, is old), we can safely ignore any issues. |
67 | */ | 67 | */ |
68 | if (ret && pte_val(entry) & shared_pte_mask) { | 68 | if (ret && (pte_val(entry) & L_PTE_MT_MASK) != shared_pte_mask) { |
69 | flush_cache_page(vma, address, pte_pfn(entry)); | 69 | flush_cache_page(vma, address, pte_pfn(entry)); |
70 | pte_val(entry) &= ~shared_pte_mask; | 70 | pte_val(entry) &= ~L_PTE_MT_MASK; |
71 | pte_val(entry) |= shared_pte_mask; | ||
71 | set_pte_at(vma->vm_mm, address, pte, entry); | 72 | set_pte_at(vma->vm_mm, address, pte, entry); |
72 | flush_tlb_page(vma, address); | 73 | flush_tlb_page(vma, address); |
73 | } | 74 | } |
@@ -199,7 +200,7 @@ void __init check_writebuffer_bugs(void) | |||
199 | unsigned long *p1, *p2; | 200 | unsigned long *p1, *p2; |
200 | pgprot_t prot = __pgprot(L_PTE_PRESENT|L_PTE_YOUNG| | 201 | pgprot_t prot = __pgprot(L_PTE_PRESENT|L_PTE_YOUNG| |
201 | L_PTE_DIRTY|L_PTE_WRITE| | 202 | L_PTE_DIRTY|L_PTE_WRITE| |
202 | L_PTE_BUFFERABLE); | 203 | L_PTE_MT_BUFFERABLE); |
203 | 204 | ||
204 | p1 = vmap(&page, 1, VM_IOREMAP, prot); | 205 | p1 = vmap(&page, 1, VM_IOREMAP, prot); |
205 | p2 = vmap(&page, 1, VM_IOREMAP, prot); | 206 | p2 = vmap(&page, 1, VM_IOREMAP, prot); |
@@ -220,7 +221,7 @@ void __init check_writebuffer_bugs(void) | |||
220 | 221 | ||
221 | if (v) { | 222 | if (v) { |
222 | printk("failed, %s\n", reason); | 223 | printk("failed, %s\n", reason); |
223 | shared_pte_mask |= L_PTE_BUFFERABLE; | 224 | shared_pte_mask = L_PTE_MT_UNCACHED; |
224 | } else { | 225 | } else { |
225 | printk("ok\n"); | 226 | printk("ok\n"); |
226 | } | 227 | } |