Index: linux-2.6.9-rc4-ck3/arch/i386/kernel/cpu/mtrr/generic.c =================================================================== --- linux-2.6.9-rc4-ck3.orig/arch/i386/kernel/cpu/mtrr/generic.c 2004-08-15 14:08:04.000000000 +1000 +++ linux-2.6.9-rc4-ck3/arch/i386/kernel/cpu/mtrr/generic.c 2004-10-16 23:38:18.908003558 +1000 @@ -240,11 +240,14 @@ static void prepare_set(void) /* Note that this is not ideal, since the cache is only flushed/disabled for this CPU while the MTRRs are changed, but changing this requires more invasive changes to the way the kernel boots */ - spin_lock(&set_atomicity_lock); + /* + * Since we are disabling the cache dont allow any interrupts - they + * would run extremely slow and would only increase the pain: + */ + spin_lock_irq(&set_atomicity_lock); /* Enter the no-fill (CD=1, NW=0) cache mode and flush caches. */ cr0 = read_cr0() | 0x40000000; /* set CD flag */ - wbinvd(); write_cr0(cr0); wbinvd(); @@ -266,8 +269,7 @@ static void prepare_set(void) static void post_set(void) { - /* Flush caches and TLBs */ - wbinvd(); + /* Flush TLBs (no need to flush caches - they are disabled) */ __flush_tlb(); /* Intel (P6) standard MTRRs */ @@ -279,7 +281,7 @@ static void post_set(void) /* Restore value of CR4 */ if ( cpu_has_pge ) write_cr4(cr4); - spin_unlock(&set_atomicity_lock); + spin_unlock_irq(&set_atomicity_lock); } static void generic_set_all(void) Index: linux-2.6.9-rc4-ck3/arch/i386/kernel/entry.S =================================================================== --- linux-2.6.9-rc4-ck3.orig/arch/i386/kernel/entry.S 2004-10-11 16:15:58.000000000 +1000 +++ linux-2.6.9-rc4-ck3/arch/i386/kernel/entry.S 2004-10-16 23:38:18.938998719 +1000 @@ -218,10 +218,8 @@ need_resched: jz restore_all testl $IF_MASK,EFLAGS(%esp) # interrupts off (exception path) ? jz restore_all - movl $PREEMPT_ACTIVE,TI_preempt_count(%ebp) sti - call schedule - movl $0,TI_preempt_count(%ebp) + call preempt_schedule cli jmp need_resched #endif Index: linux-2.6.9-rc4-ck3/arch/i386/oprofile/nmi_int.c =================================================================== --- linux-2.6.9-rc4-ck3.orig/arch/i386/oprofile/nmi_int.c 2004-05-23 12:54:46.000000000 +1000 +++ linux-2.6.9-rc4-ck3/arch/i386/oprofile/nmi_int.c 2004-10-16 23:38:18.954996221 +1000 @@ -311,7 +311,7 @@ struct oprofile_operations nmi_ops = { static int __init p4_init(void) { - __u8 cpu_model = current_cpu_data.x86_model; + __u8 cpu_model = boot_cpu_data.x86_model; if (cpu_model > 3) return 0; @@ -342,7 +342,7 @@ static int __init p4_init(void) static int __init ppro_init(void) { - __u8 cpu_model = current_cpu_data.x86_model; + __u8 cpu_model = boot_cpu_data.x86_model; if (cpu_model > 0xd) return 0; @@ -366,8 +366,8 @@ static int using_nmi; int __init nmi_init(struct oprofile_operations ** ops) { - __u8 vendor = current_cpu_data.x86_vendor; - __u8 family = current_cpu_data.x86; + __u8 vendor = boot_cpu_data.x86_vendor; + __u8 family = boot_cpu_data.x86; if (!cpu_has_apic) return -ENODEV; Index: linux-2.6.9-rc4-ck3/drivers/char/pty.c =================================================================== --- linux-2.6.9-rc4-ck3.orig/drivers/char/pty.c 2004-10-11 16:15:59.000000000 +1000 +++ linux-2.6.9-rc4-ck3/drivers/char/pty.c 2004-10-16 23:38:18.983991694 +1000 @@ -140,6 +140,7 @@ static int pty_write(struct tty_struct * c += n; count -= n; to->ldisc.receive_buf(to, temp_buffer, NULL, n); + cond_resched(); } up(&tty->flip.pty_sem); } else { Index: linux-2.6.9-rc4-ck3/drivers/video/console/vgacon.c =================================================================== --- linux-2.6.9-rc4-ck3.orig/drivers/video/console/vgacon.c 2004-08-15 14:08:09.000000000 +1000 +++ linux-2.6.9-rc4-ck3/drivers/video/console/vgacon.c 2004-10-16 23:38:18.994989977 +1000 @@ -49,6 +49,7 @@ #include #include #include +#include #include