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 | |
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')
-rw-r--r-- | include/asm-x86/desc_32.h | 10 | ||||
-rw-r--r-- | include/asm-x86/paravirt.h | 9 |
2 files changed, 13 insertions, 6 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) |
diff --git a/include/asm-x86/paravirt.h b/include/asm-x86/paravirt.h index 0333fb6988b5..86a9d7b0920f 100644 --- a/include/asm-x86/paravirt.h +++ b/include/asm-x86/paravirt.h | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/types.h> | 17 | #include <linux/types.h> |
18 | #include <linux/cpumask.h> | 18 | #include <linux/cpumask.h> |
19 | #include <asm/kmap_types.h> | 19 | #include <asm/kmap_types.h> |
20 | #include <asm/desc_defs.h> | ||
20 | 21 | ||
21 | struct page; | 22 | struct page; |
22 | struct thread_struct; | 23 | struct thread_struct; |
@@ -99,8 +100,8 @@ struct pv_cpu_ops { | |||
99 | int entrynum, u32 low, u32 high); | 100 | int entrynum, u32 low, u32 high); |
100 | void (*write_gdt_entry)(struct desc_struct *, | 101 | void (*write_gdt_entry)(struct desc_struct *, |
101 | int entrynum, u32 low, u32 high); | 102 | int entrynum, u32 low, u32 high); |
102 | void (*write_idt_entry)(struct desc_struct *, | 103 | void (*write_idt_entry)(gate_desc *, |
103 | int entrynum, u32 low, u32 high); | 104 | int entrynum, const gate_desc *gate); |
104 | void (*load_sp0)(struct tss_struct *tss, struct thread_struct *t); | 105 | void (*load_sp0)(struct tss_struct *tss, struct thread_struct *t); |
105 | 106 | ||
106 | void (*set_iopl_mask)(unsigned mask); | 107 | void (*set_iopl_mask)(unsigned mask); |
@@ -667,9 +668,9 @@ static inline void write_gdt_entry(void *dt, int entry, u32 low, u32 high) | |||
667 | { | 668 | { |
668 | PVOP_VCALL4(pv_cpu_ops.write_gdt_entry, dt, entry, low, high); | 669 | PVOP_VCALL4(pv_cpu_ops.write_gdt_entry, dt, entry, low, high); |
669 | } | 670 | } |
670 | static inline void write_idt_entry(void *dt, int entry, u32 low, u32 high) | 671 | static inline void write_idt_entry(gate_desc *dt, int entry, const gate_desc *g) |
671 | { | 672 | { |
672 | PVOP_VCALL4(pv_cpu_ops.write_idt_entry, dt, entry, low, high); | 673 | PVOP_VCALL3(pv_cpu_ops.write_idt_entry, dt, entry, g); |
673 | } | 674 | } |
674 | static inline void set_iopl_mask(unsigned mask) | 675 | static inline void set_iopl_mask(unsigned mask) |
675 | { | 676 | { |