Skip to content

Commit

Permalink
x86: enable cpus display of kernel_max and offlined cpus
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mike Travis authored and Ingo Molnar committed Jan 3, 2009
1 parent 6bdf197 commit 730cf27
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/x86/kernel/smpboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -1298,6 +1298,8 @@ __init void prefill_possible_map(void)
else
possible = setup_possible_cpus;

total_cpus = max_t(int, possible, num_processors + disabled_cpus);

if (possible > CONFIG_NR_CPUS) {
printk(KERN_WARNING
"%d Processors exceeds NR_CPUS limit of %d\n",
Expand Down

0 comments on commit 730cf27

Please sign in to comment.