aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-06-02 19:02:22 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-02 19:02:22 -0400
commit48e49ead3e92d53196a78c42cf24c0eed6ca98dd (patch)
tree021e1b1616258cfcee73556fa4095db5663afc61 /include
parentb1ab41c4943008375c149a63602d7407f61de5b2 (diff)
parent0b0968a3e691771bf87e1ce747b2c7d23b5526c8 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6: [SPARC64]: Fix D-cache corruption in mremap [SPARC64]: Make smp_processor_id() functional before start_kernel()
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/pgtable.h11
-rw-r--r--include/asm-mips/pgtable.h10
-rw-r--r--include/asm-sparc64/pgtable.h17
3 files changed, 27 insertions, 11 deletions
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h
index 358e4d309ceb..c2059a3a0621 100644
--- a/include/asm-generic/pgtable.h
+++ b/include/asm-generic/pgtable.h
@@ -159,17 +159,8 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addres
159#define lazy_mmu_prot_update(pte) do { } while (0) 159#define lazy_mmu_prot_update(pte) do { } while (0)
160#endif 160#endif
161 161
162#ifndef __HAVE_ARCH_MULTIPLE_ZERO_PAGE 162#ifndef __HAVE_ARCH_MOVE_PTE
163#define move_pte(pte, prot, old_addr, new_addr) (pte) 163#define move_pte(pte, prot, old_addr, new_addr) (pte)
164#else
165#define move_pte(pte, prot, old_addr, new_addr) \
166({ \
167 pte_t newpte = (pte); \
168 if (pte_present(pte) && pfn_valid(pte_pfn(pte)) && \
169 pte_page(pte) == ZERO_PAGE(old_addr)) \
170 newpte = mk_pte(ZERO_PAGE(new_addr), (prot)); \
171 newpte; \
172})
173#endif 164#endif
174 165
175/* 166/*
diff --git a/include/asm-mips/pgtable.h b/include/asm-mips/pgtable.h
index 174a3cda8c26..f80fe75c7800 100644
--- a/include/asm-mips/pgtable.h
+++ b/include/asm-mips/pgtable.h
@@ -70,7 +70,15 @@ extern unsigned long zero_page_mask;
70#define ZERO_PAGE(vaddr) \ 70#define ZERO_PAGE(vaddr) \
71 (virt_to_page(empty_zero_page + (((unsigned long)(vaddr)) & zero_page_mask))) 71 (virt_to_page(empty_zero_page + (((unsigned long)(vaddr)) & zero_page_mask)))
72 72
73#define __HAVE_ARCH_MULTIPLE_ZERO_PAGE 73#define __HAVE_ARCH_MOVE_PTE
74#define move_pte(pte, prot, old_addr, new_addr) \
75({ \
76 pte_t newpte = (pte); \
77 if (pte_present(pte) && pfn_valid(pte_pfn(pte)) && \
78 pte_page(pte) == ZERO_PAGE(old_addr)) \
79 newpte = mk_pte(ZERO_PAGE(new_addr), (prot)); \
80 newpte; \
81})
74 82
75extern void paging_init(void); 83extern void paging_init(void);
76 84
diff --git a/include/asm-sparc64/pgtable.h b/include/asm-sparc64/pgtable.h
index c44e7466534e..cd464f469a2c 100644
--- a/include/asm-sparc64/pgtable.h
+++ b/include/asm-sparc64/pgtable.h
@@ -689,6 +689,23 @@ static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *p
689#define pte_clear(mm,addr,ptep) \ 689#define pte_clear(mm,addr,ptep) \
690 set_pte_at((mm), (addr), (ptep), __pte(0UL)) 690 set_pte_at((mm), (addr), (ptep), __pte(0UL))
691 691
692#ifdef DCACHE_ALIASING_POSSIBLE
693#define __HAVE_ARCH_MOVE_PTE
694#define move_pte(pte, prot, old_addr, new_addr) \
695({ \
696 pte_t newpte = (pte); \
697 if (tlb_type != hypervisor && pte_present(pte)) { \
698 unsigned long this_pfn = pte_pfn(pte); \
699 \
700 if (pfn_valid(this_pfn) && \
701 (((old_addr) ^ (new_addr)) & (1 << 13))) \
702 flush_dcache_page_all(current->mm, \
703 pfn_to_page(this_pfn)); \
704 } \
705 newpte; \
706})
707#endif
708
692extern pgd_t swapper_pg_dir[2048]; 709extern pgd_t swapper_pg_dir[2048];
693extern pmd_t swapper_low_pmd_dir[2048]; 710extern pmd_t swapper_low_pmd_dir[2048];
694 711