x86: enable cpus display of kernel_max and offlined cpus

Impact: enables /sys/devices/system/cpu/{kernel_max,offline} user interface

By setting total_cpus, the drivers/base/cpu.c will display the
values of kernel_max (NR_CPUS-1) and the offlined cpu map.

Signed-off-by: Mike Travis <travis@sgi.com>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
Mike Travis 2008-12-31 18:08:45 -08:00 committed by Ingo Molnar
parent 6bdf197b04
commit 730cf27246
1 changed files with 2 additions and 0 deletions

View File

@ -1298,6 +1298,8 @@ __init void prefill_possible_map(void)
else else
possible = setup_possible_cpus; possible = setup_possible_cpus;
total_cpus = max_t(int, possible, num_processors + disabled_cpus);
if (possible > CONFIG_NR_CPUS) { if (possible > CONFIG_NR_CPUS) {
printk(KERN_WARNING printk(KERN_WARNING
"%d Processors exceeds NR_CPUS limit of %d\n", "%d Processors exceeds NR_CPUS limit of %d\n",