diff options
author | Jan Beulich <JBeulich@novell.com> | 2010-04-27 17:01:20 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-21 12:37:28 -0400 |
commit | cdc6e3d3968052cebb2f2ddcd742bff29fbd1a90 (patch) | |
tree | 874fbded0f516a84112200080fb22d28920e6362 /drivers/base/cpu.c | |
parent | d7dbf4ffee1c7a17e2e5b5f01efe76fbd1671db6 (diff) |
drivers/base/cpu.c: fix the output from /sys/devices/system/cpu/offline
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>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/base/cpu.c')
-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 f35719aab3c1..251acea3d359 100644 --- a/drivers/base/cpu.c +++ b/drivers/base/cpu.c | |||
@@ -186,7 +186,7 @@ static ssize_t print_cpus_offline(struct sysdev_class *class, | |||
186 | /* display offline cpus < nr_cpu_ids */ | 186 | /* display offline cpus < nr_cpu_ids */ |
187 | if (!alloc_cpumask_var(&offline, GFP_KERNEL)) | 187 | if (!alloc_cpumask_var(&offline, GFP_KERNEL)) |
188 | return -ENOMEM; | 188 | return -ENOMEM; |
189 | cpumask_complement(offline, cpu_online_mask); | 189 | cpumask_andnot(offline, cpu_possible_mask, cpu_online_mask); |
190 | n = cpulist_scnprintf(buf, len, offline); | 190 | n = cpulist_scnprintf(buf, len, offline); |
191 | free_cpumask_var(offline); | 191 | free_cpumask_var(offline); |
192 | 192 | ||