summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/amd.c
diff options
context:
space:
mode:
authorAndi Kleen2019-03-30 01:47:36 +0100
committerThomas Gleixner2019-04-19 17:47:35 +0200
commit26b31f46f036ad89de20cbbb732b76289411eddb (patch)
treeb7ff02c3e0b0561eb5d848cd15270dd319f1cb49 /arch/x86/kernel/cpu/amd.c
parentx86/asm: Mark all top level asm statements as .text (diff)
downloadkernel-qcow2-linux-26b31f46f036ad89de20cbbb732b76289411eddb.tar.gz
kernel-qcow2-linux-26b31f46f036ad89de20cbbb732b76289411eddb.tar.xz
kernel-qcow2-linux-26b31f46f036ad89de20cbbb732b76289411eddb.zip
x86/cpu/amd: Exclude 32bit only assembler from 64bit build
The "vide" inline assembler is only needed on 32bit kernels for old 32bit only CPUs. Guard it with an #ifdef so it's not included in 64bit builds. Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lkml.kernel.org/r/20190330004743.29541-2-andi@firstfloor.org
Diffstat (limited to 'arch/x86/kernel/cpu/amd.c')
-rw-r--r--arch/x86/kernel/cpu/amd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index 1bcb489e07e7..fb6a64bd765f 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -82,12 +82,14 @@ static inline int wrmsrl_amd_safe(unsigned msr, unsigned long long val)
* performance at the same time..
*/
+#ifdef CONFIG_X86_32
extern __visible void vide(void);
__asm__(".text\n"
".globl vide\n"
".type vide, @function\n"
".align 4\n"
"vide: ret\n");
+#endif
static void init_amd_k5(struct cpuinfo_x86 *c)
{