aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-mips
diff options
context:
space:
mode:
authorHugh Dickins <hugh@veritas.com>2007-01-29 16:24:08 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-01-30 11:33:32 -0500
commit701dfbc1cbdd42b814dd76a885c4b73f97011d08 (patch)
tree4a8e8185616e7cc9c115de564bd2c6d626662217 /include/asm-mips
parent8339f0008c47cdd921c73f6d53d5588b5484f93c (diff)
[PATCH] mm: mremap correct rmap accounting
Nick Piggin points out that page accounting on MIPS multiple ZERO_PAGEs is not maintained by its move_pte, and could lead to freeing a ZERO_PAGE. Instead of complicating that move_pte, just forget the minor optimization when mremapping, and change the one thing which needed it for correctness - filemap_xip use ZERO_PAGE(0) throughout instead of according to address. [ "There is no block device driver one could use for XIP on mips platforms" - Carsten Otte ] Signed-off-by: Hugh Dickins <hugh@veritas.com> Cc: Nick Piggin <nickpiggin@yahoo.com.au> Cc: Andrew Morton <akpm@osdl.org> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Carsten Otte <cotte@de.ibm.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-mips')
-rw-r--r--include/asm-mips/pgtable.h10
1 files changed, 0 insertions, 10 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
82extern void paging_init(void); 72extern void paging_init(void);
83 73
84/* 74/*