diff options
Diffstat (limited to 'arch/x86/include/asm/system.h')
-rw-r--r-- | arch/x86/include/asm/system.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/x86/include/asm/system.h b/arch/x86/include/asm/system.h index 2fcc70bc85f3..70c74b8db875 100644 --- a/arch/x86/include/asm/system.h +++ b/arch/x86/include/asm/system.h | |||
@@ -182,6 +182,15 @@ extern void native_load_gs_index(unsigned); | |||
182 | #define savesegment(seg, value) \ | 182 | #define savesegment(seg, value) \ |
183 | asm("mov %%" #seg ",%0":"=r" (value) : : "memory") | 183 | asm("mov %%" #seg ",%0":"=r" (value) : : "memory") |
184 | 184 | ||
185 | /* | ||
186 | * x86_32 user gs accessors. | ||
187 | */ | ||
188 | #ifdef CONFIG_X86_32 | ||
189 | #define get_user_gs(regs) (u16)({unsigned long v; savesegment(gs, v); v;}) | ||
190 | #define set_user_gs(regs, v) loadsegment(gs, (unsigned long)(v)) | ||
191 | #define task_user_gs(tsk) ((tsk)->thread.gs) | ||
192 | #endif | ||
193 | |||
185 | static inline unsigned long get_limit(unsigned long segment) | 194 | static inline unsigned long get_limit(unsigned long segment) |
186 | { | 195 | { |
187 | unsigned long __limit; | 196 | unsigned long __limit; |