File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ /* SPDX-License-Identifier: GPL-2.0-only */
2+ #ifndef _ASM_X86_GSSEG_H
3+ #define _ASM_X86_GSSEG_H
4+
5+ #include <linux/types.h>
6+
7+ #include <asm/asm.h>
8+ #include <asm/cpufeature.h>
9+ #include <asm/alternative.h>
10+ #include <asm/processor.h>
11+ #include <asm/nops.h>
12+
13+ #ifdef CONFIG_X86_64
14+
15+ extern asmlinkage void asm_load_gs_index (u16 selector );
16+
17+ static inline void native_load_gs_index (unsigned int selector )
18+ {
19+ unsigned long flags ;
20+
21+ local_irq_save (flags );
22+ asm_load_gs_index (selector );
23+ local_irq_restore (flags );
24+ }
25+
26+ #endif /* CONFIG_X86_64 */
27+
28+ #ifndef CONFIG_PARAVIRT_XXL
29+
30+ static inline void load_gs_index (unsigned int selector )
31+ {
32+ #ifdef CONFIG_X86_64
33+ native_load_gs_index (selector );
34+ #else
35+ loadsegment (gs , selector );
36+ #endif
37+ }
38+
39+ #endif /* CONFIG_PARAVIRT_XXL */
40+
41+ #endif /* _ASM_X86_GSSEG_H */
Original file line number Diff line number Diff line change 1212#include <asm/tlbflush.h>
1313#include <asm/paravirt.h>
1414#include <asm/debugreg.h>
15+ #include <asm/gsseg.h>
1516
1617extern atomic64_t last_mm_ctx_id ;
1718
Original file line number Diff line number Diff line change @@ -120,17 +120,6 @@ static inline void native_wbinvd(void)
120120 asm volatile ("wbinvd" : : :"memory" );
121121}
122122
123- extern asmlinkage void asm_load_gs_index (u16 selector );
124-
125- static inline void native_load_gs_index (unsigned int selector )
126- {
127- unsigned long flags ;
128-
129- local_irq_save (flags );
130- asm_load_gs_index (selector );
131- local_irq_restore (flags );
132- }
133-
134123static inline unsigned long __read_cr4 (void )
135124{
136125 return native_read_cr4 ();
@@ -184,16 +173,6 @@ static inline void wbinvd(void)
184173 native_wbinvd ();
185174}
186175
187-
188- static inline void load_gs_index (unsigned int selector )
189- {
190- #ifdef CONFIG_X86_64
191- native_load_gs_index (selector );
192- #else
193- loadsegment (gs , selector );
194- #endif
195- }
196-
197176#endif /* CONFIG_PARAVIRT_XXL */
198177
199178static inline void clflush (volatile void * __p )
Original file line number Diff line number Diff line change 3232#include <asm/special_insns.h>
3333#include <asm/tlb.h>
3434#include <asm/io_bitmap.h>
35+ #include <asm/gsseg.h>
3536
3637/*
3738 * nop stub, which must not clobber anything *including the stack* to
Original file line number Diff line number Diff line change 3131#include <asm/sigframe.h>
3232#include <asm/sighandling.h>
3333#include <asm/smap.h>
34+ #include <asm/gsseg.h>
3435
3536#ifdef CONFIG_IA32_EMULATION
3637#include <asm/ia32_unistd.h>
Original file line number Diff line number Diff line change 1212#include <asm/ldt.h>
1313#include <asm/processor.h>
1414#include <asm/proto.h>
15+ #include <asm/gsseg.h>
1516
1617#include "tls.h"
1718
You can’t perform that action at this time.
0 commit comments