aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/system.h
diff options
context:
space:
mode:
authorGlauber de Oliveira Costa <gcosta@redhat.com>2008-01-30 07:31:08 -0500
committerIngo Molnar <mingo@elte.hu>2008-01-30 07:31:08 -0500
commita6b4655258efd39b590e519815ed43bb74cd7188 (patch)
tree3da933deec46772bd4078a7f1e4fc30de1192c79 /include/asm-x86/system.h
parentd89542229b657bdcce6a6f76168f9098ee3e9344 (diff)
x86: unify load_segment macro
This patch unifies the load_segment() macro, making them equal in both x86_64 and i386 architectures. The common version goes to system.h, and the old are deleted. Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/asm-x86/system.h')
-rw-r--r--include/asm-x86/system.h21
1 files changed, 21 insertions, 0 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) \