diff options
| author | Paul Mackerras <paulus@samba.org> | 2005-09-29 13:13:36 +1000 |
|---|---|---|
| committer | Paul Mackerras <paulus@samba.org> | 2005-09-29 13:13:36 +1000 |
| commit | ab11d1ea281e85895369ef57c5259ad8a432fabb (patch) | |
| tree | 684147479c6a8bb2fbed21bdcf12de1dd519c730 /include/asm-generic | |
| parent | 952ecef7a0479049c8abb7c34a688ec2981ceadd (diff) | |
| parent | 664cceb0093b755739e56572b836a99104ee8a75 (diff) | |
Merge by hand from Linus' tree.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-generic')
| -rw-r--r-- | include/asm-generic/pgtable.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h index f86c1e549466..ff28c8b31f58 100644 --- a/include/asm-generic/pgtable.h +++ b/include/asm-generic/pgtable.h @@ -158,6 +158,19 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addres #define lazy_mmu_prot_update(pte) do { } while (0) #endif +#ifndef __HAVE_ARCH_MULTIPLE_ZERO_PAGE +#define move_pte(pte, prot, old_addr, new_addr) (pte) +#else +#define move_pte(pte, prot, old_addr, new_addr) \ +({ \ + pte_t newpte = (pte); \ + if (pte_present(pte) && pfn_valid(pte_pfn(pte)) && \ + pte_page(pte) == ZERO_PAGE(old_addr)) \ + newpte = mk_pte(ZERO_PAGE(new_addr), (prot)); \ + newpte; \ +}) +#endif + /* * When walking page tables, get the address of the next boundary, * or the end address of the range if that comes earlier. Although no |
