]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
[SPARC64]: Warn user if cpu is ignored.
authorDavid S. Miller <davem@sunset.davemloft.net>
Sun, 16 Sep 2007 21:45:06 +0000 (14:45 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Sun, 16 Sep 2007 21:45:06 +0000 (14:45 -0700)
When NR_CPUS is smaller than the cpu probed, let the user
know that the cpu won't be used.

Suggested by Al Viro.

Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc64/kernel/mdesc.c
arch/sparc64/kernel/prom.c

index 9f22e4ff6015771e8c39106f7df2baff3c315633..856659bb13116ed7444c263ec1a9f8087c660ec7 100644 (file)
@@ -777,8 +777,12 @@ void __devinit mdesc_fill_in_cpu_data(cpumask_t mask)
                cpuid = *id;
 
 #ifdef CONFIG_SMP
-               if (cpuid >= NR_CPUS)
+               if (cpuid >= NR_CPUS) {
+                       printk(KERN_WARNING "Ignoring CPU %d which is "
+                              ">= NR_CPUS (%d)\n",
+                              cpuid, NR_CPUS);
                        continue;
+               }
                if (!cpu_isset(cpuid, mask))
                        continue;
 #else
index d1a78c976cef0cfe73c9b51a2610d3ab4fa4d015..0614dff63d7c095b0e80711f09b336583439c0df 100644 (file)
@@ -1583,8 +1583,12 @@ static void __init of_fill_in_cpu_data(void)
                ncpus_probed++;
 
 #ifdef CONFIG_SMP
-               if (cpuid >= NR_CPUS)
+               if (cpuid >= NR_CPUS) {
+                       printk(KERN_WARNING "Ignoring CPU %d which is "
+                              ">= NR_CPUS (%d)\n",
+                              cpuid, NR_CPUS);
                        continue;
+               }
 #else
                /* On uniprocessor we only want the values for the
                 * real physical cpu the kernel booted onto, however