]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mm: pgtable -- Require X86_64 for soft-dirty tracker, v2
authorCyrill Gorcunov <gorcunov@gmail.com>
Thu, 22 May 2014 00:43:09 +0000 (10:43 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 22 May 2014 00:43:09 +0000 (10:43 +1000)
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 <gorcunov@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/x86/include/asm/pgtable.h

index 66276c1d23bbb1dd215967d1981bb4845e717c14..0ec0560126180a152372ac3fc908752ea6e9ce87 100644 (file)
@@ -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 <asm-generic/pgtable.h>
 #endif /* __ASSEMBLY__ */