From abf56f5ea98c71722511e37d321982013123dbbf Mon Sep 17 00:00:00 2001 From: Shaohua Li Date: Sat, 23 Dec 2006 21:39:08 -0500 Subject: [PATCH] [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 --- arch/i386/kernel/smpboot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c index 4bb8b77cd65b..b5f562eec611 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); -- 2.39.5