Skip to content

Commit d73a105

Browse files
committed
x86/mm: Move arch_memory_failure() and arch_is_platform_page() definitions from <asm/processor.h> to <asm/pgtable.h>
<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
1 parent 8f10046 commit d73a105

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

arch/x86/include/asm/pgtable.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1708,6 +1708,14 @@ static inline bool pud_user_accessible_page(pud_t pud)
17081708
}
17091709
#endif
17101710

1711+
#ifdef CONFIG_X86_SGX
1712+
int arch_memory_failure(unsigned long pfn, int flags);
1713+
#define arch_memory_failure arch_memory_failure
1714+
1715+
bool arch_is_platform_page(u64 paddr);
1716+
#define arch_is_platform_page arch_is_platform_page
1717+
#endif
1718+
17111719
#endif /* __ASSEMBLY__ */
17121720

17131721
#endif /* _ASM_X86_PGTABLE_H */

arch/x86/include/asm/processor.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -726,14 +726,6 @@ enum mds_mitigations {
726726
MDS_MITIGATION_VMWERV,
727727
};
728728

729-
#ifdef CONFIG_X86_SGX
730-
int arch_memory_failure(unsigned long pfn, int flags);
731-
#define arch_memory_failure arch_memory_failure
732-
733-
bool arch_is_platform_page(u64 paddr);
734-
#define arch_is_platform_page arch_is_platform_page
735-
#endif
736-
737729
extern bool gds_ucode_mitigated(void);
738730

739731
#endif /* _ASM_X86_PROCESSOR_H */

0 commit comments

Comments
 (0)