diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-27 19:46:08 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-27 19:46:08 -0400 |
commit | 3e318b5b55fafebd3a6e4dd3a00b79bfc0668675 (patch) | |
tree | e2be576d5ab3487d0c350b421bff7e285fd056c2 /arch/arm/mm/fault-armv.c | |
parent | 940389b8afad6495211614c13eb91ef7001773ec (diff) | |
parent | 53cdb27a933e4032934cbda0b447cfc9943c0eac (diff) |
Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
[ARM] Fix shared mmap when more than two maps of the same file exist
[ARM] fix VIPT/VIVT macro optimisations, add comments
[ARM] 5179/1: Replace obsolete IRQT_* and __IRQT_* values with IRQ_TYPE_*
[ARM] update defconfig for eseries.
[ARM] PXA: squash warning in pxafb
[ARM] pxa: PXA25x UDC - Fix warning during build
[ARM] fix nwflash.c: 6ee8928d94841aa764aeaf645ad16daff811dc26
[ARM] fix IOP32x, IOP33x, MXC and Samsung builds
[ARM] pci: provide dummy pci_get_legacy_ide_irq()
[ARM] fix fls() for 64-bit arguments
[ARM] fix mode for board-yl-9200.c
[ARM] 5176/1: arm/Makefile: fix: ARM946T -> ARM946E
Diffstat (limited to 'arch/arm/mm/fault-armv.c')
-rw-r--r-- | arch/arm/mm/fault-armv.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/arm/mm/fault-armv.c b/arch/arm/mm/fault-armv.c index fbfa26058442..a8ec97b4752e 100644 --- a/arch/arm/mm/fault-armv.c +++ b/arch/arm/mm/fault-armv.c | |||
@@ -37,7 +37,7 @@ static int adjust_pte(struct vm_area_struct *vma, unsigned long address) | |||
37 | pgd_t *pgd; | 37 | pgd_t *pgd; |
38 | pmd_t *pmd; | 38 | pmd_t *pmd; |
39 | pte_t *pte, entry; | 39 | pte_t *pte, entry; |
40 | int ret = 0; | 40 | int ret; |
41 | 41 | ||
42 | pgd = pgd_offset(vma->vm_mm, address); | 42 | pgd = pgd_offset(vma->vm_mm, address); |
43 | if (pgd_none(*pgd)) | 43 | if (pgd_none(*pgd)) |
@@ -55,15 +55,19 @@ static int adjust_pte(struct vm_area_struct *vma, unsigned long address) | |||
55 | entry = *pte; | 55 | entry = *pte; |
56 | 56 | ||
57 | /* | 57 | /* |
58 | * If this page is present, it's actually being shared. | ||
59 | */ | ||
60 | ret = pte_present(entry); | ||
61 | |||
62 | /* | ||
58 | * If this page isn't present, or is already setup to | 63 | * If this page isn't present, or is already setup to |
59 | * fault (ie, is old), we can safely ignore any issues. | 64 | * fault (ie, is old), we can safely ignore any issues. |
60 | */ | 65 | */ |
61 | if (pte_present(entry) && pte_val(entry) & shared_pte_mask) { | 66 | if (ret && pte_val(entry) & shared_pte_mask) { |
62 | flush_cache_page(vma, address, pte_pfn(entry)); | 67 | flush_cache_page(vma, address, pte_pfn(entry)); |
63 | pte_val(entry) &= ~shared_pte_mask; | 68 | pte_val(entry) &= ~shared_pte_mask; |
64 | set_pte_at(vma->vm_mm, address, pte, entry); | 69 | set_pte_at(vma->vm_mm, address, pte, entry); |
65 | flush_tlb_page(vma, address); | 70 | flush_tlb_page(vma, address); |
66 | ret = 1; | ||
67 | } | 71 | } |
68 | pte_unmap(pte); | 72 | pte_unmap(pte); |
69 | return ret; | 73 | return ret; |