]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: use device_online/offline() instead of cpu_up/down()
authorDan Streetman <ddstreet@ieee.org>
Fri, 31 Oct 2014 19:41:34 +0000 (15:41 -0400)
committerMichael Ellerman <mpe@ellerman.id.au>
Sat, 1 Nov 2014 23:55:56 +0000 (10:55 +1100)
commit5f1cd40aee6b3913e9ec45428162254957a9e1b0
tree49c2adaa9a8acb915b490eaf92b52161b396eed6
parentda13a251760e4ccd23f488ed6d623e0b89c7a804
powerpc: use device_online/offline() instead of cpu_up/down()

In powerpc pseries platform dlpar operations, use device_online() and
device_offline() instead of cpu_up() and cpu_down().

Calling cpu_up/down() directly does not update the cpu device offline
field, which is used to online/offline a cpu from sysfs. Calling
device_online/offline() instead keeps the sysfs cpu online value
correct. The hotplug lock, which is required to be held when calling
device_online/offline(), is already held when dlpar_online/offline_cpu()
are called, since they are called only from cpu_probe|release_store().

This patch fixes errors on phyp (PowerVM) systems that have cpu(s)
added/removed using dlpar operations; without this patch, the
/sys/devices/system/cpu/cpuN/online nodes do not correctly show the
online state of added/removed cpus.

Signed-off-by: Dan Streetman <ddstreet@ieee.org>
Cc: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Fixes: 739379f35f23 ("Driver core: Use generic offline/online for CPU offline/online")
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/pseries/dlpar.c