From: Zi Yan <zi....@cs.rutgers.edu> pmd swap soft dirty support is added, too.
Signed-off-by: Zi Yan <zi....@cs.rutgers.edu> Cc: Martin Schwidefsky <schwidef...@de.ibm.com> Cc: Heiko Carstens <heiko.carst...@de.ibm.com> Cc: Janosch Frank <fran...@linux.vnet.ibm.com> Cc: Naoya Horiguchi <n-horigu...@ah.jp.nec.com> Cc: linux-s...@vger.kernel.org Cc: linux...@kvack.org --- arch/s390/include/asm/pgtable.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h index 2d24d33bf188..215fbb34203e 100644 --- a/arch/s390/include/asm/pgtable.h +++ b/arch/s390/include/asm/pgtable.h @@ -798,18 +798,21 @@ static inline int pmd_soft_dirty(pmd_t pmd) { return pmd_val(pmd) & _SEGMENT_ENTRY_SOFT_DIRTY; } +#define pmd_swp_soft_dirty pmd_soft_dirty static inline pmd_t pmd_mksoft_dirty(pmd_t pmd) { pmd_val(pmd) |= _SEGMENT_ENTRY_SOFT_DIRTY; return pmd; } +#define pmd_swp_mksoft_dirty pmd_mksoft_dirty static inline pmd_t pmd_clear_soft_dirty(pmd_t pmd) { pmd_val(pmd) &= ~_SEGMENT_ENTRY_SOFT_DIRTY; return pmd; } +#define pmd_swp_clear_soft_dirty pmd_clear_soft_dirty /* * query functions pte_write/pte_dirty/pte_young only work if @@ -1594,7 +1597,9 @@ static inline swp_entry_t __swp_entry(unsigned long type, unsigned long offset) } #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) +#define __pmd_to_swp_entry(pte) ((swp_entry_t) { pmd_val(pmd) }) #define __swp_entry_to_pte(x) ((pte_t) { (x).val }) +#define __swp_entry_to_pmd(x) ((pmd_t) { (x).val }) #define kern_addr_valid(addr) (1) -- 2.17.0