File tree Expand file tree Collapse file tree 6 files changed +45
-21
lines changed Expand file tree Collapse file tree 6 files changed +45
-21
lines changed 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 12
12
#include <asm/tlbflush.h>
13
13
#include <asm/paravirt.h>
14
14
#include <asm/debugreg.h>
15
+ #include <asm/gsseg.h>
15
16
16
17
extern atomic64_t last_mm_ctx_id ;
17
18
Original file line number Diff line number Diff line change @@ -120,17 +120,6 @@ static inline void native_wbinvd(void)
120
120
asm volatile ("wbinvd" : : :"memory" );
121
121
}
122
122
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
-
134
123
static inline unsigned long __read_cr4 (void )
135
124
{
136
125
return native_read_cr4 ();
@@ -184,16 +173,6 @@ static inline void wbinvd(void)
184
173
native_wbinvd ();
185
174
}
186
175
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
-
197
176
#endif /* CONFIG_PARAVIRT_XXL */
198
177
199
178
static inline void clflush (volatile void * __p )
Original file line number Diff line number Diff line change 32
32
#include <asm/special_insns.h>
33
33
#include <asm/tlb.h>
34
34
#include <asm/io_bitmap.h>
35
+ #include <asm/gsseg.h>
35
36
36
37
/*
37
38
* nop stub, which must not clobber anything *including the stack* to
Original file line number Diff line number Diff line change 31
31
#include <asm/sigframe.h>
32
32
#include <asm/sighandling.h>
33
33
#include <asm/smap.h>
34
+ #include <asm/gsseg.h>
34
35
35
36
#ifdef CONFIG_IA32_EMULATION
36
37
#include <asm/ia32_unistd.h>
Original file line number Diff line number Diff line change 12
12
#include <asm/ldt.h>
13
13
#include <asm/processor.h>
14
14
#include <asm/proto.h>
15
+ #include <asm/gsseg.h>
15
16
16
17
#include "tls.h"
17
18
You can’t perform that action at this time.
0 commit comments