]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/powernv: Clear PECE1 in LPCR via stop-api only on Hotplug
authorGautham R. Shenoy <ego@linux.vnet.ibm.com>
Fri, 21 Jul 2017 11:01:34 +0000 (16:31 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 1 Aug 2017 11:01:28 +0000 (21:01 +1000)
commite64b26e085ca79f042a22ddbb6cc74be34362000
tree2628f824043e14a6c7b3dc08340aa854bc077209
parent7fdeae2a453d517a37f5ce5bf81a399a17b23ab6
powerpc/powernv: Clear PECE1 in LPCR via stop-api only on Hotplug

Currently we use the stop-api provided by the firmware to program the
SLW engine to restore the values of hypervisor resources that get lost
on deeper idle states (such as winkle). Since the deep states were
only used for CPU-Hotplug on POWER8 systems, we would program the LPCR
to have the PECE1 bit since Hotplugged CPUs shouldn't be spuriously
woken up by decrementer.

On POWER9, some of the deep platform idle states such as stop4 can be
used in cpuidle as well. In this case, we want the CPU in stop4 to be
woken up by the decrementer when some timer on the CPU expires.

In this patch, we program the stop-api for LPCR with PECE1
bit cleared only when we are offlining the CPU and set it
back once the CPU is online.

Signed-off-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/powernv/idle.c
arch/powerpc/platforms/powernv/smp.c