direct-io.hg
changeset 149:9641fabdd4fd
bitkeeper revision 1.22.2.18 (3e4b7ac6lRUYOXBu_qQoWvQ9Gtm2BA)
smpboot.c:
Fix to per-CPU IDTs.
smpboot.c:
Fix to per-CPU IDTs.
author | kaf24@labyrinth.cl.cam.ac.uk |
---|---|
date | Thu Feb 13 11:00:22 2003 +0000 (2003-02-13) |
parents | 8b22726a81da |
children | 12beced1bf62 |
files | xen-2.4.16/arch/i386/smpboot.c |
line diff
1.1 --- a/xen-2.4.16/arch/i386/smpboot.c Wed Feb 12 18:06:56 2003 +0000 1.2 +++ b/xen-2.4.16/arch/i386/smpboot.c Thu Feb 13 11:00:22 2003 +0000 1.3 @@ -396,8 +396,8 @@ int cpucount; 1.4 int __init start_secondary(void *unused) 1.5 { 1.6 unsigned int cpu = smp_processor_id(); 1.7 - /* A 'mem64' suitable for passing to LIDT instruction. */ 1.8 - unsigned long idt_load[2] = { (IDT_ENTRIES*8)-1, 0 }; 1.9 + /* 6 bytes suitable for passing to LIDT instruction. */ 1.10 + unsigned char idt_load[6]; 1.11 1.12 extern void cpu_init(void); 1.13 1.14 @@ -418,7 +418,8 @@ int __init start_secondary(void *unused) 1.15 */ 1.16 idt_tables[cpu] = kmalloc(IDT_ENTRIES*8, GFP_KERNEL); 1.17 memcpy(idt_tables[cpu], idt_table, IDT_ENTRIES*8); 1.18 - idt_load[2] = (unsigned long)idt_tables[cpu]; 1.19 + *(unsigned short *)(&idt_load[0]) = (IDT_ENTRIES*8)-1; 1.20 + *(unsigned long *)(&idt_load[2]) = (unsigned long)idt_tables[cpu]; 1.21 __asm__ __volatile__ ( "lidt %0" : "=m" (idt_load) ); 1.22 1.23 /*