X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fasm-ia64%2Fpgtable.h;h=8433966536e625cd1e2a803c5f87817bb48e6ac6;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=590432c084076ca5b8f48727010773c92f9d2ab1;hpb=db216c3d5e4c040e557a50f8f5d35d5c415e8c1c;p=linux-2.6.git diff --git a/include/asm-ia64/pgtable.h b/include/asm-ia64/pgtable.h index 590432c08..843396653 100644 --- a/include/asm-ia64/pgtable.h +++ b/include/asm-ia64/pgtable.h @@ -297,11 +297,7 @@ ia64_phys_addr_valid (unsigned long addr) * works bypasses the caches, but does allow for consecutive writes to * be combined into single (but larger) write transactions. */ -#ifdef CONFIG_MCKINLEY_A0_SPECIFIC -# define pgprot_writecombine(prot) prot -#else -# define pgprot_writecombine(prot) __pgprot((pgprot_val(prot) & ~_PAGE_MA_MASK) | _PAGE_MA_WC) -#endif +#define pgprot_writecombine(prot) __pgprot((pgprot_val(prot) & ~_PAGE_MA_MASK) | _PAGE_MA_WC) static inline unsigned long pgd_index (unsigned long address) @@ -325,6 +321,11 @@ pgd_offset (struct mm_struct *mm, unsigned long address) #define pgd_offset_k(addr) \ (init_mm.pgd + (((addr) >> PGDIR_SHIFT) & (PTRS_PER_PGD - 1))) +/* Look up a pgd entry in the gate area. On IA-64, the gate-area + resides in the kernel-mapped segment, hence we use pgd_offset_k() + here. */ +#define pgd_offset_gate(mm, addr) pgd_offset_k(addr) + /* Find an entry in the second-level page table.. */ #define pmd_offset(dir,addr) \ ((pmd_t *) pgd_page(*(dir)) + (((addr) >> PMD_SHIFT) & (PTRS_PER_PMD - 1))) @@ -346,6 +347,8 @@ static inline int ptep_test_and_clear_young (pte_t *ptep) { #ifdef CONFIG_SMP + if (!pte_young(*ptep)) + return 0; return test_and_clear_bit(_PAGE_A_BIT, ptep); #else pte_t pte = *ptep; @@ -360,6 +363,8 @@ static inline int ptep_test_and_clear_dirty (pte_t *ptep) { #ifdef CONFIG_SMP + if (!pte_dirty(*ptep)) + return 0; return test_and_clear_bit(_PAGE_D_BIT, ptep); #else pte_t pte = *ptep; @@ -552,6 +557,7 @@ do { \ #define __HAVE_ARCH_PTEP_SET_WRPROTECT #define __HAVE_ARCH_PTEP_MKDIRTY #define __HAVE_ARCH_PTE_SAME +#define __HAVE_ARCH_PGD_OFFSET_GATE #include #endif /* _ASM_IA64_PGTABLE_H */