]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
x86/mm: Move arch_memory_failure() and arch_is_platform_page() definitions from ...
authorIngo Molnar <mingo@kernel.org>
Fri, 22 Sep 2023 07:29:59 +0000 (09:29 +0200)
committerIngo Molnar <mingo@kernel.org>
Fri, 22 Sep 2023 07:32:03 +0000 (09:32 +0200)
<linux/mm.h> relies on these definitions being included first,
which is true currently due to historic header spaghetti,
but in the future <asm/processor.h> will not guaranteed to be
included by the MM code.

Move these definitions over into a suitable MM header.

This is a preparatory patch for x86 header dependency simplifications
and reductions.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org
arch/x86/include/asm/pgtable.h
arch/x86/include/asm/processor.h

index d6ad98ca1288d22f7b69c05382a404b47427e611..1e12e61d7ed7f127f1c968d53de1c1c314e8ccd7 100644 (file)
@@ -1708,6 +1708,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 */
index 0086920cda061f83f2050822646bfadbc0f474bc..1b2b138d189df73262b03c96718c0583db17c3a8 100644 (file)
@@ -726,14 +726,6 @@ enum mds_mitigations {
        MDS_MITIGATION_VMWERV,
 };
 
-#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
-
 extern bool gds_ucode_mitigated(void);
 
 #endif /* _ASM_X86_PROCESSOR_H */