aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/asm-x86/system.h21
-rw-r--r--include/asm-x86/system_32.h22
-rw-r--r--include/asm-x86/system_64.h20
3 files changed, 21 insertions, 42 deletions
diff --git a/include/asm-x86/system.h b/include/asm-x86/system.h
index d0803f8c70c4..3740bada097c 100644
--- a/include/asm-x86/system.h
+++ b/include/asm-x86/system.h
@@ -39,6 +39,27 @@ __asm__ __volatile__ ("movw %%dx,%1\n\t" \
39#define set_limit(ldt, limit) _set_limit(((char *)&(ldt)) , ((limit)-1)) 39#define set_limit(ldt, limit) _set_limit(((char *)&(ldt)) , ((limit)-1))
40 40
41/* 41/*
42 * Load a segment. Fall back on loading the zero
43 * segment if something goes wrong..
44 */
45#define loadsegment(seg, value) \
46 asm volatile("\n" \
47 "1:\t" \
48 "movl %k0,%%" #seg "\n" \
49 "2:\n" \
50 ".section .fixup,\"ax\"\n" \
51 "3:\t" \
52 "movl %k1, %%" #seg "\n\t" \
53 "jmp 2b\n" \
54 ".previous\n" \
55 ".section __ex_table,\"a\"\n\t" \
56 _ASM_ALIGN "\n\t" \
57 _ASM_PTR " 1b,3b\n" \
58 ".previous" \
59 : :"r" (value), "r" (0))
60
61
62/*
42 * Save a segment register away 63 * Save a segment register away
43 */ 64 */
44#define savesegment(seg, value) \ 65#define savesegment(seg, value) \
diff --git a/include/asm-x86/system_32.h b/include/asm-x86/system_32.h
index fb457642ac58..8db478984ed1 100644
--- a/include/asm-x86/system_32.h
+++ b/include/asm-x86/system_32.h
@@ -34,28 +34,6 @@ extern struct task_struct * FASTCALL(__switch_to(struct task_struct *prev, struc
34 "2" (prev), "d" (next)); \ 34 "2" (prev), "d" (next)); \
35} while (0) 35} while (0)
36 36
37/*
38 * Load a segment. Fall back on loading the zero
39 * segment if something goes wrong..
40 */
41#define loadsegment(seg,value) \
42 asm volatile("\n" \
43 "1:\t" \
44 "mov %0,%%" #seg "\n" \
45 "2:\n" \
46 ".section .fixup,\"ax\"\n" \
47 "3:\t" \
48 "pushl $0\n\t" \
49 "popl %%" #seg "\n\t" \
50 "jmp 2b\n" \
51 ".previous\n" \
52 ".section __ex_table,\"a\"\n\t" \
53 ".align 4\n\t" \
54 ".long 1b,3b\n" \
55 ".previous" \
56 : :"rm" (value))
57
58
59static inline void native_clts(void) 37static inline void native_clts(void)
60{ 38{
61 asm volatile ("clts"); 39 asm volatile ("clts");
diff --git a/include/asm-x86/system_64.h b/include/asm-x86/system_64.h
index cc5b2666a044..0885caace5d4 100644
--- a/include/asm-x86/system_64.h
+++ b/include/asm-x86/system_64.h
@@ -50,26 +50,6 @@
50extern void load_gs_index(unsigned); 50extern void load_gs_index(unsigned);
51 51
52/* 52/*
53 * Load a segment. Fall back on loading the zero
54 * segment if something goes wrong..
55 */
56#define loadsegment(seg,value) \
57 asm volatile("\n" \
58 "1:\t" \
59 "movl %k0,%%" #seg "\n" \
60 "2:\n" \
61 ".section .fixup,\"ax\"\n" \
62 "3:\t" \
63 "movl %1,%%" #seg "\n\t" \
64 "jmp 2b\n" \
65 ".previous\n" \
66 ".section __ex_table,\"a\"\n\t" \
67 ".align 8\n\t" \
68 ".quad 1b,3b\n" \
69 ".previous" \
70 : :"r" (value), "r" (0))
71
72/*
73 * Clear and set 'TS' bit respectively 53 * Clear and set 'TS' bit respectively
74 */ 54 */
75#define clts() __asm__ __volatile__ ("clts") 55#define clts() __asm__ __volatile__ ("clts")