summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/special_insns.h
diff options
context:
space:
mode:
authorBrian Gerst <brgerst@gmail.com>2022-03-25 16:39:53 +0100
committerBorislav Petkov <bp@suse.de>2022-04-14 14:15:54 +0200
commit203d8919a9eda5d1bc68ac3cd7637588334c9dc1 (patch)
tree59b295ea0838b4ef36457fb3576ad23344eabe7a /arch/x86/include/asm/special_insns.h
parentx86/32: Remove lazy GS macros (diff)
downloadlinux-203d8919a9eda5d1bc68ac3cd7637588334c9dc1.tar.xz
linux-203d8919a9eda5d1bc68ac3cd7637588334c9dc1.zip
x86/asm: Merge load_gs_index()
Merge the 32- and 64-bit implementations of load_gs_index(). Signed-off-by: Brian Gerst <brgerst@gmail.com> Signed-off-by: Borislav Petkov <bp@suse.de> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Andy Lutomirski <luto@kernel.org> Link: https://lore.kernel.org/r/20220325153953.162643-5-brgerst@gmail.com
Diffstat (limited to 'arch/x86/include/asm/special_insns.h')
-rw-r--r--arch/x86/include/asm/special_insns.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/x86/include/asm/special_insns.h b/arch/x86/include/asm/special_insns.h
index 68c257a3de0d..45b18eb94fa1 100644
--- a/arch/x86/include/asm/special_insns.h
+++ b/arch/x86/include/asm/special_insns.h
@@ -184,14 +184,15 @@ static inline void wbinvd(void)
native_wbinvd();
}
-#ifdef CONFIG_X86_64
static inline void load_gs_index(unsigned int selector)
{
+#ifdef CONFIG_X86_64
native_load_gs_index(selector);
-}
-
+#else
+ loadsegment(gs, selector);
#endif
+}
#endif /* CONFIG_PARAVIRT_XXL */