diff options
author | Jan Beulich <JBeulich@novell.com> | 2010-04-27 14:01:20 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-07-05 11:15:45 -0700 |
commit | 753a8491d6ccd145632d74e690391b0be3edd76b (patch) | |
tree | 15b69c52146768069478749105a6950c5dfe425d /drivers | |
parent | b2d17f0dfb4b4f6e961823b45e18442851304760 (diff) |
drivers/base/cpu.c: fix the output from /sys/devices/system/cpu/offline
commit cdc6e3d3968052cebb2f2ddcd742bff29fbd1a90 upstream.
Without CONFIG_CPUMASK_OFFSTACK, simply inverting cpu_online_mask leads
to CPUs beyond nr_cpu_ids to be displayed twice and CPUs not even
possible to be displayed as offline.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/base/cpu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c index 958bd1540c30..7b71a15a58fc 100644 --- a/drivers/base/cpu.c +++ b/drivers/base/cpu.c @@ -183,7 +183,7 @@ static ssize_t print_cpus_offline(struct sysdev_class *class, char *buf) /* display offline cpus < nr_cpu_ids */ if (!alloc_cpumask_var(&offline, GFP_KERNEL)) return -ENOMEM; - cpumask_complement(offline, cpu_online_mask); + cpumask_andnot(offline, cpu_possible_mask, cpu_online_mask); n = cpulist_scnprintf(buf, len, offline); free_cpumask_var(offline); |