Skip to content

Commit eb3515d

Browse files
arndbhansendc
authored andcommitted
x86: Move gds_ucode_mitigated() declaration to header
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: 81ac7e5 ("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
1 parent a57c27c commit eb3515d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

arch/x86/include/asm/processor.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -731,4 +731,6 @@ bool arch_is_platform_page(u64 paddr);
731731
#define arch_is_platform_page arch_is_platform_page
732732
#endif
733733

734+
extern bool gds_ucode_mitigated(void);
735+
734736
#endif /* _ASM_X86_PROCESSOR_H */

arch/x86/kvm/x86.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,8 +314,6 @@ u64 __read_mostly host_xcr0;
314314

315315
static struct kmem_cache *x86_emulator_cache;
316316

317-
extern bool gds_ucode_mitigated(void);
318-
319317
/*
320318
* When called, it means the previous get/set msr reached an invalid msr.
321319
* Return true if we want to ignore/silent this failed msr access.

0 commit comments

Comments
 (0)