Commit 8a177c4f authored by David S. Miller's avatar David S. Miller

[SPARC64]: Warn user if cpu is ignored.

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: default avatarDavid S. Miller <davem@davemloft.net>
parent 301feb65
...@@ -777,8 +777,12 @@ void __devinit mdesc_fill_in_cpu_data(cpumask_t mask) ...@@ -777,8 +777,12 @@ void __devinit mdesc_fill_in_cpu_data(cpumask_t mask)
cpuid = *id; cpuid = *id;
#ifdef CONFIG_SMP #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; continue;
}
if (!cpu_isset(cpuid, mask)) if (!cpu_isset(cpuid, mask))
continue; continue;
#else #else
......
...@@ -1583,8 +1583,12 @@ static void __init of_fill_in_cpu_data(void) ...@@ -1583,8 +1583,12 @@ static void __init of_fill_in_cpu_data(void)
ncpus_probed++; ncpus_probed++;
#ifdef CONFIG_SMP #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; continue;
}
#else #else
/* On uniprocessor we only want the values for the /* On uniprocessor we only want the values for the
* real physical cpu the kernel booted onto, however * real physical cpu the kernel booted onto, however
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment