aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2008-01-30 07:30:13 -0500
committerIngo Molnar <mingo@elte.hu>2008-01-30 07:30:13 -0500
commitfc2d625c4fac18e672a3b7c61af5de22d7ab7d87 (patch)
treea6d450d94181bca5d058f73e9a4a6163058664b6 /include
parent4edc8f5454814201d2fb222354284365b4f0537c (diff)
x86: introduce ldt_write accessor
Create a ldt write accessor like the 32 bit one. Preparatory patch for merging ldt.c and anyway necessary for 64bit paravirt ops. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include')
-rw-r--r--include/asm-x86/desc_64.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/asm-x86/desc_64.h b/include/asm-x86/desc_64.h
index bb2009ecbbca..7d48df72aef2 100644
--- a/include/asm-x86/desc_64.h
+++ b/include/asm-x86/desc_64.h
@@ -38,6 +38,15 @@ extern struct desc_struct default_ldt[];
38extern struct gate_struct idt_table[]; 38extern struct gate_struct idt_table[];
39extern struct desc_ptr cpu_gdt_descr[]; 39extern struct desc_ptr cpu_gdt_descr[];
40 40
41static inline void write_ldt_entry(struct desc_struct *ldt,
42 int entry, u32 entry_low, u32 entry_high)
43{
44 __u32 *lp = (__u32 *)((entry << 3) + (char *)ldt);
45
46 lp[0] = entry_low;
47 lp[1] = entry_high;
48}
49
41/* the cpu gdt accessor */ 50/* the cpu gdt accessor */
42#define cpu_gdt(_cpu) ((struct desc_struct *)cpu_gdt_descr[_cpu].address) 51#define cpu_gdt(_cpu) ((struct desc_struct *)cpu_gdt_descr[_cpu].address)
43 52