diff options
author | Glauber de Oliveira Costa <gcosta@redhat.com> | 2008-01-30 07:31:13 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:31:13 -0500 |
commit | 014b15be30c04622d130946ab7c0a9101b523a8a (patch) | |
tree | 9138df88eb59da0021a4ac10c8ce4c66f9a62e13 /arch/x86/xen/enlighten.c | |
parent | 18245d5b6e54ca76b60b687e43eb893f9e9dd611 (diff) |
x86: change write_gdt_entry signature.
This patch changes the write_gdt_entry function signature.
Instead of the old "a" and "b" parameters, it now receives
a pointer to a desc_struct, and the size of the entry being
handled. This is because x86_64 can have some 16-byte entries
as well as 8-byte ones.
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 'arch/x86/xen/enlighten.c')
-rw-r--r-- | arch/x86/xen/enlighten.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index b7b7346d8cdc..7f98c63f6381 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c | |||
@@ -475,22 +475,21 @@ static void xen_load_idt(const struct desc_ptr *desc) | |||
475 | /* Write a GDT descriptor entry. Ignore LDT descriptors, since | 475 | /* Write a GDT descriptor entry. Ignore LDT descriptors, since |
476 | they're handled differently. */ | 476 | they're handled differently. */ |
477 | static void xen_write_gdt_entry(struct desc_struct *dt, int entry, | 477 | static void xen_write_gdt_entry(struct desc_struct *dt, int entry, |
478 | u32 low, u32 high) | 478 | const void *desc, int type) |
479 | { | 479 | { |
480 | preempt_disable(); | 480 | preempt_disable(); |
481 | 481 | ||
482 | switch ((high >> 8) & 0xff) { | 482 | switch (type) { |
483 | case DESCTYPE_LDT: | 483 | case DESC_LDT: |
484 | case DESCTYPE_TSS: | 484 | case DESC_TSS: |
485 | /* ignore */ | 485 | /* ignore */ |
486 | break; | 486 | break; |
487 | 487 | ||
488 | default: { | 488 | default: { |
489 | xmaddr_t maddr = virt_to_machine(&dt[entry]); | 489 | xmaddr_t maddr = virt_to_machine(&dt[entry]); |
490 | u64 desc = (u64)high << 32 | low; | ||
491 | 490 | ||
492 | xen_mc_flush(); | 491 | xen_mc_flush(); |
493 | if (HYPERVISOR_update_descriptor(maddr.maddr, desc)) | 492 | if (HYPERVISOR_update_descriptor(maddr.maddr, *(u64 *)desc)) |
494 | BUG(); | 493 | BUG(); |
495 | } | 494 | } |
496 | 495 | ||