diff options
-rw-r--r-- | include/asm-mips/pgtable.h | 10 | ||||
-rw-r--r-- | mm/filemap_xip.c | 4 | ||||
-rw-r--r-- | mm/mremap.c | 1 |
3 files changed, 2 insertions, 13 deletions
diff --git a/include/asm-mips/pgtable.h b/include/asm-mips/pgtable.h index f2e1325fec6c..3fcfd7979de5 100644 --- a/include/asm-mips/pgtable.h +++ b/include/asm-mips/pgtable.h | |||
@@ -69,16 +69,6 @@ extern unsigned long zero_page_mask; | |||
69 | #define ZERO_PAGE(vaddr) \ | 69 | #define ZERO_PAGE(vaddr) \ |
70 | (virt_to_page((void *)(empty_zero_page + (((unsigned long)(vaddr)) & zero_page_mask)))) | 70 | (virt_to_page((void *)(empty_zero_page + (((unsigned long)(vaddr)) & zero_page_mask)))) |
71 | 71 | ||
72 | #define __HAVE_ARCH_MOVE_PTE | ||
73 | #define move_pte(pte, prot, old_addr, new_addr) \ | ||
74 | ({ \ | ||
75 | pte_t newpte = (pte); \ | ||
76 | if (pte_present(pte) && pfn_valid(pte_pfn(pte)) && \ | ||
77 | pte_page(pte) == ZERO_PAGE(old_addr)) \ | ||
78 | newpte = mk_pte(ZERO_PAGE(new_addr), (prot)); \ | ||
79 | newpte; \ | ||
80 | }) | ||
81 | |||
82 | extern void paging_init(void); | 72 | extern void paging_init(void); |
83 | 73 | ||
84 | /* | 74 | /* |
diff --git a/mm/filemap_xip.c b/mm/filemap_xip.c index 45b3553865cf..9dd9fbb75139 100644 --- a/mm/filemap_xip.c +++ b/mm/filemap_xip.c | |||
@@ -183,7 +183,7 @@ __xip_unmap (struct address_space * mapping, | |||
183 | address = vma->vm_start + | 183 | address = vma->vm_start + |
184 | ((pgoff - vma->vm_pgoff) << PAGE_SHIFT); | 184 | ((pgoff - vma->vm_pgoff) << PAGE_SHIFT); |
185 | BUG_ON(address < vma->vm_start || address >= vma->vm_end); | 185 | BUG_ON(address < vma->vm_start || address >= vma->vm_end); |
186 | page = ZERO_PAGE(address); | 186 | page = ZERO_PAGE(0); |
187 | pte = page_check_address(page, mm, address, &ptl); | 187 | pte = page_check_address(page, mm, address, &ptl); |
188 | if (pte) { | 188 | if (pte) { |
189 | /* Nuke the page table entry. */ | 189 | /* Nuke the page table entry. */ |
@@ -246,7 +246,7 @@ xip_file_nopage(struct vm_area_struct * area, | |||
246 | __xip_unmap(mapping, pgoff); | 246 | __xip_unmap(mapping, pgoff); |
247 | } else { | 247 | } else { |
248 | /* not shared and writable, use ZERO_PAGE() */ | 248 | /* not shared and writable, use ZERO_PAGE() */ |
249 | page = ZERO_PAGE(address); | 249 | page = ZERO_PAGE(0); |
250 | } | 250 | } |
251 | 251 | ||
252 | out: | 252 | out: |
diff --git a/mm/mremap.c b/mm/mremap.c index 9c769fa29f32..5d4bd4f95b8e 100644 --- a/mm/mremap.c +++ b/mm/mremap.c | |||
@@ -105,7 +105,6 @@ static void move_ptes(struct vm_area_struct *vma, pmd_t *old_pmd, | |||
105 | if (pte_none(*old_pte)) | 105 | if (pte_none(*old_pte)) |
106 | continue; | 106 | continue; |
107 | pte = ptep_clear_flush(vma, old_addr, old_pte); | 107 | pte = ptep_clear_flush(vma, old_addr, old_pte); |
108 | /* ZERO_PAGE can be dependant on virtual addr */ | ||
109 | pte = move_pte(pte, new_vma->vm_page_prot, old_addr, new_addr); | 108 | pte = move_pte(pte, new_vma->vm_page_prot, old_addr, new_addr); |
110 | set_pte_at(mm, new_addr, new_pte, pte); | 109 | set_pte_at(mm, new_addr, new_pte, pte); |
111 | } | 110 | } |