]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/xmon: Fix printing of set of CPUs in xmon
authorPaul Mackerras <paulus@samba.org>
Tue, 3 Sep 2013 10:16:23 +0000 (20:16 +1000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 5 Sep 2013 07:29:19 +0000 (17:29 +1000)
commitb624cfc5784badeb7640670fbfed2dc96ba9b99a
tree02229ae5302d089f349ae9a6740a800bb45f322a
parentbc0515f021b367be077cc628d3ed8d610a05d358
powerpc/xmon: Fix printing of set of CPUs in xmon

Commit f8c0f47e92 ("powerpc/xmon: Use cpumask iterator to avoid warning")
replaced a loop from 0 to NR_CPUS-1 with a for_each_possible_cpu() loop,
which means that if the last possible cpu is in xmon, we print the
wrong value for the end of the range.  For example, if 4 cpus are
possible, NR_CPUS is 128, and all cpus are in xmon, we print "0-7f"
rather than "0-3".  The code also assumes that the set of possible
cpus is contiguous, which may not necessarily be true.

This fixes the code to check explicitly for contiguity, and to print
the ending value correctly.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/xmon/xmon.c