cpuset: fix the problem that cpuset_mem_spread_node() returns an offline node
[safe/jmp/linux-2.6] / init / main.c
index 40aaa02..cbead27 100644 (file)
@@ -174,7 +174,7 @@ static int __init maxcpus(char *str)
 
 early_param("maxcpus", maxcpus);
 #else
-const unsigned int setup_max_cpus = NR_CPUS;
+static const unsigned int setup_max_cpus = NR_CPUS;
 #endif
 
 /*
@@ -618,7 +618,7 @@ asmlinkage void __init start_kernel(void)
        local_irq_enable();
 
        /* Interrupts are enabled now so all GFP allocations are safe. */
-       set_gfp_allowed_mask(__GFP_BITS_MASK);
+       gfp_allowed_mask = __GFP_BITS_MASK;
 
        kmem_cache_init_late();
 
@@ -847,7 +847,8 @@ static noinline int init_post(void)
        run_init_process("/bin/init");
        run_init_process("/bin/sh");
 
-       panic("No init found.  Try passing init= option to kernel.");
+       panic("No init found.  Try passing init= option to kernel. "
+             "See Linux Documentation/init.txt for guidance.");
 }
 
 static int __init kernel_init(void * unused)
@@ -857,7 +858,7 @@ static int __init kernel_init(void * unused)
        /*
         * init can allocate pages on any node
         */
-       set_mems_allowed(node_possible_map);
+       set_mems_allowed(node_states[N_HIGH_MEMORY]);
        /*
         * init can run on any cpu.
         */