From: Shaohua Li Date: Sun, 24 Dec 2006 02:39:08 +0000 (-0500) Subject: [PATCH] i386: CPU hotplug broken with 2GB VMSPLIT X-Git-Tag: v2.6.19.2~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=abf56f5ea98c71722511e37d321982013123dbbf;p=thirdparty%2Fkernel%2Fstable.git [PATCH] i386: CPU hotplug broken with 2GB VMSPLIT In VMSPLIT mode, kernel PGD might have more entries than user space Signed-off-by: Shaohua Li Signed-off-by: Chris Wright --- diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c index 4bb8b77cd65b2..b5f562eec6117 100644 --- a/arch/i386/kernel/smpboot.c +++ b/arch/i386/kernel/smpboot.c @@ -1095,7 +1095,7 @@ static int __cpuinit __smp_prepare_cpu(int cpu) /* init low mem mapping */ clone_pgd_range(swapper_pg_dir, swapper_pg_dir + USER_PGD_PTRS, - KERNEL_PGD_PTRS); + min_t(unsigned long, KERNEL_PGD_PTRS, USER_PGD_PTRS)); flush_tlb_all(); schedule_work(&task); wait_for_completion(&done);