From: Shaohua Li Date: Fri, 8 Dec 2006 10:41:13 +0000 (-0800) Subject: [PATCH] CPU hotplug broken with 2GB VMSPLIT X-Git-Tag: v2.6.20-rc1~34^2~42 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3b1bdf4e08d6a8d4fae5a30224ed2c55bf1e43fc;p=platform%2Fkernel%2Flinux-exynos.git [PATCH] CPU hotplug broken with 2GB VMSPLIT In VMSPLIT mode, kernel PGD might have more entries than user space. Acked-by: Jens Axboe Signed-off-by: Shaohua Li Cc: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c index 4bf0e3c..1e00b03 100644 --- a/arch/i386/kernel/smpboot.c +++ b/arch/i386/kernel/smpboot.c @@ -1118,7 +1118,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(&info.task); wait_for_completion(&done);