diff options
author | Glauber de Oliveira Costa <gcosta@redhat.com> | 2008-01-30 07:31:12 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:31:12 -0500 |
commit | 8d947344c47a40626730bb80d136d8daac9f2060 (patch) | |
tree | 3987eb84706b2f4e968d6838da9d2d1f6888e34e /include/asm-x86/desc_32.h | |
parent | 010d4f8221cf51a2ab8b037d0149506b397d073f (diff) |
x86: change write_idt_entry signature
this patch changes write_idt_entry signature. It now takes a gate_desc
instead of the a and b parameters. It will allow it to be later unified
between i386 and x86_64.
Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com>
CC: Zachary Amsden <zach@vmware.com>
CC: Jeremy Fitzhardinge <Jeremy.Fitzhardinge.citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/asm-x86/desc_32.h')
-rw-r--r-- | include/asm-x86/desc_32.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/asm-x86/desc_32.h b/include/asm-x86/desc_32.h index 77f1e5a4ad7c..54b2314f2ddf 100644 --- a/include/asm-x86/desc_32.h +++ b/include/asm-x86/desc_32.h | |||
@@ -70,9 +70,15 @@ static inline void pack_gate(gate_desc *gate, | |||
70 | 70 | ||
71 | #define write_ldt_entry(dt, entry, a, b) write_dt_entry(dt, entry, a, b) | 71 | #define write_ldt_entry(dt, entry, a, b) write_dt_entry(dt, entry, a, b) |
72 | #define write_gdt_entry(dt, entry, a, b) write_dt_entry(dt, entry, a, b) | 72 | #define write_gdt_entry(dt, entry, a, b) write_dt_entry(dt, entry, a, b) |
73 | #define write_idt_entry(dt, entry, a, b) write_dt_entry(dt, entry, a, b) | 73 | #define write_idt_entry(dt, entry, g) native_write_idt_entry(dt, entry, g) |
74 | #endif | 74 | #endif |
75 | 75 | ||
76 | static inline void native_write_idt_entry(gate_desc *idt, int entry, | ||
77 | const gate_desc *gate) | ||
78 | { | ||
79 | memcpy(&idt[entry], gate, sizeof(*gate)); | ||
80 | } | ||
81 | |||
76 | static inline void write_dt_entry(struct desc_struct *dt, | 82 | static inline void write_dt_entry(struct desc_struct *dt, |
77 | int entry, u32 entry_low, u32 entry_high) | 83 | int entry, u32 entry_low, u32 entry_high) |
78 | { | 84 | { |
@@ -142,7 +148,7 @@ static inline void _set_gate(int gate, unsigned int type, void *addr, unsigned s | |||
142 | { | 148 | { |
143 | gate_desc g; | 149 | gate_desc g; |
144 | pack_gate(&g, (unsigned long)addr, seg, type, 0); | 150 | pack_gate(&g, (unsigned long)addr, seg, type, 0); |
145 | write_idt_entry(idt_table, gate, g.a, g.b); | 151 | write_idt_entry(idt_table, gate, &g); |
146 | } | 152 | } |
147 | 153 | ||
148 | static inline void __set_tss_desc(unsigned int cpu, unsigned int entry, const void *addr) | 154 | static inline void __set_tss_desc(unsigned int cpu, unsigned int entry, const void *addr) |