summaryrefslogtreecommitdiff
path: root/include/linux/set_memory.h
diff options
context:
space:
mode:
authorJane Chu <jane.chu@oracle.com>2022-05-16 21:21:46 +0300
committerDan Williams <dan.j.williams@intel.com>2022-05-16 21:46:44 +0300
commitb3fdf9398a16f01dc013967a4ab25e99c3f4fc12 (patch)
treedb98561e96864f4bbe220a4c45e76d233f5bab76 /include/linux/set_memory.h
parent7917f9cdb5032ac065ac6a5415f5722f215b2608 (diff)
downloadlinux-b3fdf9398a16f01dc013967a4ab25e99c3f4fc12.tar.xz
x86/mce: relocate set{clear}_mce_nospec() functions
Relocate the twin mce functions to arch/x86/mm/pat/set_memory.c file where they belong. While at it, fixup a function name in a comment. Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Jane Chu <jane.chu@oracle.com> Acked-by: Borislav Petkov <bp@suse.de> Cc: Stephen Rothwell <sfr@canb.auug.org.au> [sfr: gate {set,clear}_mce_nospec() by CONFIG_X86_64] Link: https://lore.kernel.org/r/165272527328.90175.8336008202048685278.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'include/linux/set_memory.h')
-rw-r--r--include/linux/set_memory.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/set_memory.h b/include/linux/set_memory.h
index f36be5166c19..683a6c3f7179 100644
--- a/include/linux/set_memory.h
+++ b/include/linux/set_memory.h
@@ -42,14 +42,14 @@ static inline bool can_set_direct_map(void)
#endif
#endif /* CONFIG_ARCH_HAS_SET_DIRECT_MAP */
-#ifndef set_mce_nospec
+#ifdef CONFIG_X86_64
+int set_mce_nospec(unsigned long pfn, bool unmap);
+int clear_mce_nospec(unsigned long pfn);
+#else
static inline int set_mce_nospec(unsigned long pfn, bool unmap)
{
return 0;
}
-#endif
-
-#ifndef clear_mce_nospec
static inline int clear_mce_nospec(unsigned long pfn)
{
return 0;