x86: Move gds_ucode_mitigated() declaration to header
authorArnd Bergmann <arnd@arndb.de>
Wed, 9 Aug 2023 13:05:00 +0000 (15:05 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Aug 2023 16:27:25 +0000 (18:27 +0200)
commit19e7feda89667d01b77e84d6e7a02700106a4ae2
tree43173a5e54f084395bda075715d1dfa0a028e7e4
parentf276899f8dbc882dfa634a384ca86e056088dbde
x86: Move gds_ucode_mitigated() declaration to header

commit eb3515dc99c7c85f4170b50838136b2a193f8012 upstream.

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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/include/asm/processor.h
arch/x86/kvm/x86.c