]> git.hungrycats.org Git - linux/commitdiff
i386: fix CPU hotplug with 2GB VMSPLIT
authorShaohua Li <shaohua.li@intel.com>
Tue, 23 Jan 2007 15:52:07 +0000 (16:52 +0100)
committerAdrian Bunk <bunk@stusta.de>
Tue, 23 Jan 2007 15:52:07 +0000 (16:52 +0100)
In VMSPLIT mode, kernel PGD might have more entries than user space

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
arch/i386/kernel/smpboot.c

index 7007e1783797a1997765a3100950b5b41c2ee4a1..f04ff35437fb8859df75e690bb4910c79ec1dab4 100644 (file)
@@ -1054,7 +1054,7 @@ int __devinit 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);