aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/desc_32.h
diff options
context:
space:
mode:
authorGlauber de Oliveira Costa <gcosta@redhat.com>2008-01-30 13:31:12 +0100
committerIngo Molnar <mingo@elte.hu>2008-01-30 13:31:12 +0100
commit8d947344c47a40626730bb80d136d8daac9f2060 (patch)
tree3987eb84706b2f4e968d6838da9d2d1f6888e34e /include/asm-x86/desc_32.h
parent010d4f8221cf51a2ab8b037d0149506b397d073f (diff)
downloadkernel_samsung_tuna-8d947344c47a40626730bb80d136d8daac9f2060.zip
kernel_samsung_tuna-8d947344c47a40626730bb80d136d8daac9f2060.tar.gz
kernel_samsung_tuna-8d947344c47a40626730bb80d136d8daac9f2060.tar.bz2
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.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/asm-x86/desc_32.h b/include/asm-x86/desc_32.h
index 77f1e5a..54b2314 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,
#define write_ldt_entry(dt, entry, a, b) write_dt_entry(dt, entry, a, b)
#define write_gdt_entry(dt, entry, a, b) write_dt_entry(dt, entry, a, b)
-#define write_idt_entry(dt, entry, a, b) write_dt_entry(dt, entry, a, b)
+#define write_idt_entry(dt, entry, g) native_write_idt_entry(dt, entry, g)
#endif
+static inline void native_write_idt_entry(gate_desc *idt, int entry,
+ const gate_desc *gate)
+{
+ memcpy(&idt[entry], gate, sizeof(*gate));
+}
+
static inline void write_dt_entry(struct desc_struct *dt,
int entry, u32 entry_low, u32 entry_high)
{
@@ -142,7 +148,7 @@ static inline void _set_gate(int gate, unsigned int type, void *addr, unsigned s
{
gate_desc g;
pack_gate(&g, (unsigned long)addr, seg, type, 0);
- write_idt_entry(idt_table, gate, g.a, g.b);
+ write_idt_entry(idt_table, gate, &g);
}
static inline void __set_tss_desc(unsigned int cpu, unsigned int entry, const void *addr)