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 | 6b68f01baa810e9f63fbf39e9d5c3ef1d94a966f (patch) | |
tree | dc7f50673d72677d24dbe9ac8217b832f8d5cb02 /arch/x86/xen/enlighten.c | |
parent | 6842ef0e85a9cc1295f3ef933a230f863b01eb0f (diff) |
x86: unify struct desc_ptr
This patch unifies struct desc_ptr between i386 and x86_64.
They can be expressed in the exact same way in C code, only
having to change the name of one of them. As Xgt_desc_struct
is ugly and big, this is the one that goes away.
There's also a padding field in i386, but it is not really
needed in the C structure definition.
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 'arch/x86/xen/enlighten.c')
-rw-r--r-- | arch/x86/xen/enlighten.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index d81e8d709102..c32e0fd0f838 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c | |||
@@ -295,7 +295,7 @@ static void xen_set_ldt(const void *addr, unsigned entries) | |||
295 | xen_mc_issue(PARAVIRT_LAZY_CPU); | 295 | xen_mc_issue(PARAVIRT_LAZY_CPU); |
296 | } | 296 | } |
297 | 297 | ||
298 | static void xen_load_gdt(const struct Xgt_desc_struct *dtr) | 298 | static void xen_load_gdt(const struct desc_ptr *dtr) |
299 | { | 299 | { |
300 | unsigned long *frames; | 300 | unsigned long *frames; |
301 | unsigned long va = dtr->address; | 301 | unsigned long va = dtr->address; |
@@ -395,7 +395,7 @@ static int cvt_gate_to_trap(int vector, u32 low, u32 high, | |||
395 | } | 395 | } |
396 | 396 | ||
397 | /* Locations of each CPU's IDT */ | 397 | /* Locations of each CPU's IDT */ |
398 | static DEFINE_PER_CPU(struct Xgt_desc_struct, idt_desc); | 398 | static DEFINE_PER_CPU(struct desc_ptr, idt_desc); |
399 | 399 | ||
400 | /* Set an IDT entry. If the entry is part of the current IDT, then | 400 | /* Set an IDT entry. If the entry is part of the current IDT, then |
401 | also update Xen. */ | 401 | also update Xen. */ |
@@ -427,7 +427,7 @@ static void xen_write_idt_entry(struct desc_struct *dt, int entrynum, | |||
427 | preempt_enable(); | 427 | preempt_enable(); |
428 | } | 428 | } |
429 | 429 | ||
430 | static void xen_convert_trap_info(const struct Xgt_desc_struct *desc, | 430 | static void xen_convert_trap_info(const struct desc_ptr *desc, |
431 | struct trap_info *traps) | 431 | struct trap_info *traps) |
432 | { | 432 | { |
433 | unsigned in, out, count; | 433 | unsigned in, out, count; |
@@ -446,7 +446,7 @@ static void xen_convert_trap_info(const struct Xgt_desc_struct *desc, | |||
446 | 446 | ||
447 | void xen_copy_trap_info(struct trap_info *traps) | 447 | void xen_copy_trap_info(struct trap_info *traps) |
448 | { | 448 | { |
449 | const struct Xgt_desc_struct *desc = &__get_cpu_var(idt_desc); | 449 | const struct desc_ptr *desc = &__get_cpu_var(idt_desc); |
450 | 450 | ||
451 | xen_convert_trap_info(desc, traps); | 451 | xen_convert_trap_info(desc, traps); |
452 | } | 452 | } |
@@ -454,7 +454,7 @@ void xen_copy_trap_info(struct trap_info *traps) | |||
454 | /* Load a new IDT into Xen. In principle this can be per-CPU, so we | 454 | /* Load a new IDT into Xen. In principle this can be per-CPU, so we |
455 | hold a spinlock to protect the static traps[] array (static because | 455 | hold a spinlock to protect the static traps[] array (static because |
456 | it avoids allocation, and saves stack space). */ | 456 | it avoids allocation, and saves stack space). */ |
457 | static void xen_load_idt(const struct Xgt_desc_struct *desc) | 457 | static void xen_load_idt(const struct desc_ptr *desc) |
458 | { | 458 | { |
459 | static DEFINE_SPINLOCK(lock); | 459 | static DEFINE_SPINLOCK(lock); |
460 | static struct trap_info traps[257]; | 460 | static struct trap_info traps[257]; |