From: Cyrill Gorcunov Date: Wed, 14 May 2014 00:02:03 +0000 (+1000) Subject: mm: pgtable -- Require X86_64 for soft-dirty tracker, v2 X-Git-Tag: next-20140516~2^2~260 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=166bbe030eabf2246b1d5b554c8225764bc5ba4d;p=karo-tx-linux.git mm: pgtable -- Require X86_64 for soft-dirty tracker, v2 v2 (by akpm@): - guard helpers with CONFIG_HAVE_ARCH_SOFT_DIRTY on i386, otherwise it fails to build because we've a generic definitions in asm-generic/pgtable.h Signed-off-by: Cyrill Gorcunov Signed-off-by: Andrew Morton --- diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index 66276c1d23bb..0ec056012618 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h @@ -297,6 +297,7 @@ static inline pmd_t pmd_mknotpresent(pmd_t pmd) return pmd_clear_flags(pmd, _PAGE_PRESENT); } +#ifdef CONFIG_HAVE_ARCH_SOFT_DIRTY static inline int pte_soft_dirty(pte_t pte) { return pte_flags(pte) & _PAGE_SOFT_DIRTY; @@ -332,6 +333,8 @@ static inline int pte_file_soft_dirty(pte_t pte) return pte_flags(pte) & _PAGE_SOFT_DIRTY; } +#endif /* CONFIG_HAVE_ARCH_SOFT_DIRTY */ + /* * Mask out unsupported bits in a present pgprot. Non-present pgprots * can use those bits for other purposes, so leave them be. @@ -865,6 +868,7 @@ static inline void update_mmu_cache_pmd(struct vm_area_struct *vma, { } +#ifdef CONFIG_HAVE_ARCH_SOFT_DIRTY static inline pte_t pte_swp_mksoft_dirty(pte_t pte) { VM_BUG_ON(pte_present_nonuma(pte)); @@ -882,6 +886,7 @@ static inline pte_t pte_swp_clear_soft_dirty(pte_t pte) VM_BUG_ON(pte_present_nonuma(pte)); return pte_clear_flags(pte, _PAGE_SWP_SOFT_DIRTY); } +#endif #include #endif /* __ASSEMBLY__ */