--- zzzz-none-000/linux-2.6.19.2/arch/i386/kernel/smpboot.c 2007-01-10 19:10:37.000000000 +0000 +++ davinci-8020-5505/linux-2.6.19.2/arch/i386/kernel/smpboot.c 2007-01-19 14:42:56.000000000 +0000 @@ -1066,7 +1066,6 @@ struct warm_boot_cpu_info info; struct work_struct task; int apicid, ret; - struct Xgt_desc_struct *cpu_gdt_descr = &per_cpu(cpu_gdt_descr, cpu); apicid = x86_cpu_to_apicid[cpu]; if (apicid == BAD_APICID) { @@ -1078,13 +1077,7 @@ * the CPU isn't initialized at boot time, allocate gdt table here. * cpu_init will initialize it */ - if (!cpu_gdt_descr->address) { - cpu_gdt_descr->address = get_zeroed_page(GFP_KERNEL); - if (!cpu_gdt_descr->address) - printk(KERN_CRIT "CPU%d failed to allocate GDT\n", cpu); - ret = -ENOMEM; - goto exit; - } + cpu_gdt_descr[cpu].address = get_cpu_gdt_table(cpu); info.complete = &done; info.apicid = apicid; @@ -1095,7 +1088,7 @@ /* init low mem mapping */ clone_pgd_range(swapper_pg_dir, swapper_pg_dir + USER_PGD_PTRS, - min_t(unsigned long, KERNEL_PGD_PTRS, USER_PGD_PTRS)); + USER_PGD_PTRS >= KERNEL_PGD_PTRS ? KERNEL_PGD_PTRS : USER_PGD_PTRS); flush_tlb_all(); schedule_work(&task); wait_for_completion(&done);