#define _ASM_S390_HUGETLB_H
  
  #include <linux/pgtable.h>
+ #include <linux/swap.h>
+ #include <linux/swapops.h>
  #include <asm/page.h>
  
 -#define hugetlb_free_pgd_range                        free_pgd_range
  #define hugepages_supported()                 (MACHINE_HAS_EDAT1)
  
 +#define __HAVE_ARCH_HUGE_SET_HUGE_PTE_AT
  void set_huge_pte_at(struct mm_struct *mm, unsigned long addr,
                     pte_t *ptep, pte_t pte, unsigned long sz);
  void __set_huge_pte_at(struct mm_struct *mm, unsigned long addr,
        return pte_none(pte);
  }
  
 +#define __HAVE_ARCH_HUGE_PTE_NONE_MOSTLY
  static inline int huge_pte_none_mostly(pte_t pte)
  {
-       return huge_pte_none(pte);
+       return huge_pte_none(pte) || is_pte_marker(pte);
  }
  
 -static inline int huge_pte_write(pte_t pte)
 -{
 -      return pte_write(pte);
 -}
 -
 -static inline int huge_pte_dirty(pte_t pte)
 -{
 -      return pte_dirty(pte);
 -}
 -
 -static inline pte_t huge_pte_mkwrite(pte_t pte)
 -{
 -      return pte_mkwrite_novma(pte);
 -}
 -
 -static inline pte_t huge_pte_mkdirty(pte_t pte)
 -{
 -      return pte_mkdirty(pte);
 -}
 -
 -static inline pte_t huge_pte_wrprotect(pte_t pte)
 -{
 -      return pte_wrprotect(pte);
 -}
 -
 -static inline pte_t huge_pte_modify(pte_t pte, pgprot_t newprot)
 -{
 -      return pte_modify(pte, newprot);
 -}
 -
 +#define __HAVE_ARCH_HUGE_PTE_MKUFFD_WP
  static inline pte_t huge_pte_mkuffd_wp(pte_t pte)
  {
        return pte;