OSDN Git Service

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)
commit24be85a23d1fcdc72264a062a2e4ebaaea48feab
tree2628f824043e14a6c7b3dc08340aa854bc077209
parente1c1cfed54326fd2b17c78f0c85092167fc0783b
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