]> nv-tegra.nvidia Code Review - linux-2.6.git/blobdiff - arch/i386/kernel/smpboot.c
[PATCH] scheduler cache-hot-autodetect
[linux-2.6.git] / arch / i386 / kernel / smpboot.c
index d16520da4550e6d1b5d318a56a2f1ba1b852728c..a9bf5f222e4787a011cdaaf0ba866e553d1c51b7 100644 (file)
@@ -903,6 +903,12 @@ static int __devinit do_boot_cpu(int apicid, int cpu)
        unsigned long start_eip;
        unsigned short nmi_high = 0, nmi_low = 0;
 
+       if (!cpu_gdt_descr[cpu].address &&
+           !(cpu_gdt_descr[cpu].address = get_zeroed_page(GFP_KERNEL))) {
+               printk("Failed to allocate GDT for CPU %d\n", cpu);
+               return 1;
+       }
+
        ++cpucount;
 
        /*
@@ -1090,6 +1096,7 @@ static void smp_tune_scheduling (void)
                        cachesize = 16; /* Pentiums, 2x8kB cache */
                        bandwidth = 100;
                }
+               max_cache_size = cachesize * 1024;
        }
 }
 
@@ -1338,8 +1345,7 @@ int __cpu_disable(void)
        if (cpu == 0)
                return -EBUSY;
 
-       /* We enable the timer again on the exit path of the death loop */
-       disable_APIC_timer();
+       clear_local_APIC();
        /* Allow any queued timer interrupts to get serviced */
        local_irq_enable();
        mdelay(1);