[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <165001573943.4207.9341858824402363883.tip-bot2@tip-bot2>
Date: Fri, 15 Apr 2022 09:42:19 -0000
From: "tip-bot2 for Brian Gerst" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Brian Gerst <brgerst@...il.com>, Borislav Petkov <bp@...e.de>,
Thomas Gleixner <tglx@...utronix.de>,
Andy Lutomirski <luto@...nel.org>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: x86/core] x86/asm: Merge load_gs_index()
The following commit has been merged into the x86/core branch of tip:
Commit-ID: 203d8919a9eda5d1bc68ac3cd7637588334c9dc1
Gitweb: https://git.kernel.org/tip/203d8919a9eda5d1bc68ac3cd7637588334c9dc1
Author: Brian Gerst <brgerst@...il.com>
AuthorDate: Fri, 25 Mar 2022 11:39:53 -04:00
Committer: Borislav Petkov <bp@...e.de>
CommitterDate: Thu, 14 Apr 2022 14:15:54 +02:00
x86/asm: Merge load_gs_index()
Merge the 32- and 64-bit implementations of load_gs_index().
Signed-off-by: Brian Gerst <brgerst@...il.com>
Signed-off-by: Borislav Petkov <bp@...e.de>
Reviewed-by: Thomas Gleixner <tglx@...utronix.de>
Acked-by: Andy Lutomirski <luto@...nel.org>
Link: https://lore.kernel.org/r/20220325153953.162643-5-brgerst@gmail.com
---
arch/x86/include/asm/segment.h | 7 -------
arch/x86/include/asm/special_insns.h | 7 ++++---
2 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/arch/x86/include/asm/segment.h b/arch/x86/include/asm/segment.h
index 617b366..2e7890d 100644
--- a/arch/x86/include/asm/segment.h
+++ b/arch/x86/include/asm/segment.h
@@ -350,13 +350,6 @@ static inline void __loadsegment_fs(unsigned short value)
#define savesegment(seg, value) \
asm("mov %%" #seg ",%0":"=r" (value) : : "memory")
-/*
- * x86-32 user GS accessors. This is ugly and could do with some cleaning up.
- */
-#ifdef CONFIG_X86_32
-# define load_gs_index(v) loadsegment(gs, (v))
-#endif /* X86_32 */
-
#endif /* !__ASSEMBLY__ */
#endif /* __KERNEL__ */
diff --git a/arch/x86/include/asm/special_insns.h b/arch/x86/include/asm/special_insns.h
index 68c257a..45b18eb 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 */
Powered by blists - more mailing lists