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
This commit is contained in:
parent
3a24a60854
commit
203d8919a9
@ -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__ */
|
||||
|
||||
|
@ -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 */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user