Merge tag 'x86-mm-2023-10-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
[linux-2.6-microblaze.git] / arch / x86 / include / asm / pgtable.h
index d6ad98c..57bab91 100644 (file)
@@ -955,6 +955,14 @@ static inline int pte_same(pte_t a, pte_t b)
        return a.pte == b.pte;
 }
 
+static inline pte_t pte_next_pfn(pte_t pte)
+{
+       if (__pte_needs_invert(pte_val(pte)))
+               return __pte(pte_val(pte) - (1UL << PFN_PTE_SHIFT));
+       return __pte(pte_val(pte) + (1UL << PFN_PTE_SHIFT));
+}
+#define pte_next_pfn   pte_next_pfn
+
 static inline int pte_present(pte_t a)
 {
        return pte_flags(a) & (_PAGE_PRESENT | _PAGE_PROTNONE);
@@ -1708,6 +1716,14 @@ static inline bool pud_user_accessible_page(pud_t pud)
 }
 #endif
 
+#ifdef CONFIG_X86_SGX
+int arch_memory_failure(unsigned long pfn, int flags);
+#define arch_memory_failure arch_memory_failure
+
+bool arch_is_platform_page(u64 paddr);
+#define arch_is_platform_page arch_is_platform_page
+#endif
+
 #endif /* __ASSEMBLY__ */
 
 #endif /* _ASM_X86_PGTABLE_H */