aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/pgtable.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/include/asm/pgtable.h')
-rw-r--r--arch/x86/include/asm/pgtable.h34
1 files changed, 19 insertions, 15 deletions
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
index 8d16befdec88..3d1999458709 100644
--- a/arch/x86/include/asm/pgtable.h
+++ b/arch/x86/include/asm/pgtable.h
@@ -315,21 +315,6 @@ static inline pmd_t pmd_mksoft_dirty(pmd_t pmd)
315 return pmd_set_flags(pmd, _PAGE_SOFT_DIRTY); 315 return pmd_set_flags(pmd, _PAGE_SOFT_DIRTY);
316} 316}
317 317
318static inline pte_t pte_swp_mksoft_dirty(pte_t pte)
319{
320 return pte_set_flags(pte, _PAGE_SWP_SOFT_DIRTY);
321}
322
323static inline int pte_swp_soft_dirty(pte_t pte)
324{
325 return pte_flags(pte) & _PAGE_SWP_SOFT_DIRTY;
326}
327
328static inline pte_t pte_swp_clear_soft_dirty(pte_t pte)
329{
330 return pte_clear_flags(pte, _PAGE_SWP_SOFT_DIRTY);
331}
332
333static inline pte_t pte_file_clear_soft_dirty(pte_t pte) 318static inline pte_t pte_file_clear_soft_dirty(pte_t pte)
334{ 319{
335 return pte_clear_flags(pte, _PAGE_SOFT_DIRTY); 320 return pte_clear_flags(pte, _PAGE_SOFT_DIRTY);
@@ -446,6 +431,7 @@ pte_t *populate_extra_pte(unsigned long vaddr);
446 431
447#ifndef __ASSEMBLY__ 432#ifndef __ASSEMBLY__
448#include <linux/mm_types.h> 433#include <linux/mm_types.h>
434#include <linux/mmdebug.h>
449#include <linux/log2.h> 435#include <linux/log2.h>
450 436
451static inline int pte_none(pte_t pte) 437static inline int pte_none(pte_t pte)
@@ -864,6 +850,24 @@ static inline void update_mmu_cache_pmd(struct vm_area_struct *vma,
864{ 850{
865} 851}
866 852
853static inline pte_t pte_swp_mksoft_dirty(pte_t pte)
854{
855 VM_BUG_ON(pte_present(pte));
856 return pte_set_flags(pte, _PAGE_SWP_SOFT_DIRTY);
857}
858
859static inline int pte_swp_soft_dirty(pte_t pte)
860{
861 VM_BUG_ON(pte_present(pte));
862 return pte_flags(pte) & _PAGE_SWP_SOFT_DIRTY;
863}
864
865static inline pte_t pte_swp_clear_soft_dirty(pte_t pte)
866{
867 VM_BUG_ON(pte_present(pte));
868 return pte_clear_flags(pte, _PAGE_SWP_SOFT_DIRTY);
869}
870
867#include <asm-generic/pgtable.h> 871#include <asm-generic/pgtable.h>
868#endif /* __ASSEMBLY__ */ 872#endif /* __ASSEMBLY__ */
869 873