linux/arch/powerpc
Dan Streetman 31558a803a powerpc: use device_online/offline() instead of cpu_up/down()
commit 10ccaf178b upstream.

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: 0902a9044f ("Driver core: Use generic offline/online for CPU offline/online")
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2014-11-14 09:00:13 -08:00
..
boot Merge remote-tracking branch 'agust/next' into next 2014-01-29 16:53:55 +11:00
configs Merge remote-tracking branch 'scott/next' into next 2014-01-15 14:22:35 +11:00
crypto powerpc: Fix compile of sha1-powerpc-asm.S on 32-bit 2013-03-05 16:56:26 +11:00
include powerpc: Add smp_mb() to arch_spin_is_locked() 2014-10-05 14:52:21 -07:00
kernel powerpc: Don't skip ePAPR spin-table CPUs 2014-07-06 18:57:28 -07:00
kvm KVM: PPC: Book3S HV: Fix KVM hang with CONFIG_KVM_XICS=n 2014-05-13 13:32:48 +02:00
lib powerpc: Add smp_mb()s to arch_spin_unlock_wait() 2014-10-05 14:52:21 -07:00
math-emu powerpc: fix e500 SPE float SIGFPE generation 2014-01-07 18:43:42 -06:00
mm powerpc/thp: Use ACCESS_ONCE when loading pmdp 2014-09-17 09:19:11 -07:00
net bpf: do not use reciprocal divide 2014-01-15 17:02:08 -08:00
oprofile powerpc: Delete non-required instances of include <linux/init.h> 2014-01-15 13:46:44 +11:00
perf powerpc/perf: Fix ABIv2 kernel backtraces 2014-10-05 14:52:21 -07:00
platforms powerpc: use device_online/offline() instead of cpu_up/down() 2014-11-14 09:00:13 -08:00
sysdev powerpc: Fix build failure in sysdev/mpic.c for MPIC_WEIRD=y 2014-02-11 11:24:45 +11:00
xmon powerpc/xmon: Don't signal we've entered until we're finished printing 2014-02-11 11:24:51 +11:00
Kconfig locking/mutex: Disable optimistic spinning on some architectures 2014-07-28 08:06:03 -07:00
Kconfig.debug Merge branch 'kconfig-diet' from Dave Hansen 2013-07-04 11:25:51 -07:00
Makefile powerpc: Fix 64 bit builds with binutils 2.24 2014-06-07 10:28:28 -07:00
relocs_check.pl Fix warning typo "CONFIG_RELCOATABLE" 2013-05-29 15:11:30 +02:00