[PATCH] ARM SMP: Initialise cpu_present_map
authorRussell King <rmk@dyn-67.arm.linux.org.uk>
Mon, 11 Jul 2005 18:42:58 +0000 (19:42 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 11 Jul 2005 18:42:58 +0000 (19:42 +0100)
Rather than relying on the fixup code in init/main.c, explicitly
initialise cpu_present_map.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/kernel/smp.c
arch/arm/mach-integrator/platsmp.c

index 78c24a1266b1426f564736dcc896e378568179e4..7ae45c3fc8341425585e0847cc33472a96ed5356 100644 (file)
@@ -236,6 +236,7 @@ void __init smp_prepare_boot_cpu(void)
        unsigned int cpu = smp_processor_id();
 
        cpu_set(cpu, cpu_possible_map);
+       cpu_set(cpu, cpu_present_map);
        cpu_set(cpu, cpu_online_map);
 }
 
index 88f40a5189cd6fc8e23810bb4bbdc05b50b31d68..2ba0257770982497fa2821952a14bb395fb0ffbc 100644 (file)
@@ -174,11 +174,13 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
                max_cpus = ncores;
 
        /*
-        * Initialise the present mask - this tells us which CPUs should
-        * be present.
+        * Initialise the possible/present maps.
+        * cpu_possible_map describes the set of CPUs which may be present
+        * cpu_present_map describes the set of CPUs populated
         */
        for (i = 0; i < max_cpus; i++) {
                cpu_set(i, cpu_possible_map);
+               cpu_set(i, cpu_present_map);
        }
 
        /*