]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
x86: Move gds_ucode_mitigated() declaration to header
authorArnd Bergmann <arnd@arndb.de>
Wed, 9 Aug 2023 13:05:00 +0000 (15:05 +0200)
committerDave Hansen <dave.hansen@linux.intel.com>
Thu, 10 Aug 2023 16:13:21 +0000 (09:13 -0700)
The declaration got placed in the .c file of the caller, but that
causes a warning for the definition:

arch/x86/kernel/cpu/bugs.c:682:6: error: no previous prototype for 'gds_ucode_mitigated' [-Werror=missing-prototypes]

Move it to a header where both sides can observe it instead.

Fixes: 81ac7e5d74174 ("KVM: Add GDS_NO support to KVM")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Tested-by: Daniel Sneddon <daniel.sneddon@linux.intel.com>
Cc: stable@kernel.org
Link: https://lore.kernel.org/all/20230809130530.1913368-2-arnd%40kernel.org
arch/x86/include/asm/processor.h
arch/x86/kvm/x86.c

index 973db04065287b268451c4c7b1d57e8a55701ac2..4ae2773b873da90183ee1c6693c2030a5192acc5 100644 (file)
@@ -731,4 +731,6 @@ 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 */
index 19d9ff92d69910d221040ba37e44a545dcbdc911..c381770bcbf13509379d7218c794b5c49628844b 100644 (file)
@@ -314,8 +314,6 @@ u64 __read_mostly host_xcr0;
 
 static struct kmem_cache *x86_emulator_cache;
 
-extern bool gds_ucode_mitigated(void);
-
 /*
  * When called, it means the previous get/set msr reached an invalid msr.
  * Return true if we want to ignore/silent this failed msr access.