]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
UBUNTU: SAUCE: powerpc/powernv: Clear LPCR[PECE1] via stop-api only for deep state...
authorGautham R. Shenoy <ego@linux.vnet.ibm.com>
Thu, 31 Aug 2017 11:47:41 +0000 (17:17 +0530)
committerSeth Forshee <seth.forshee@canonical.com>
Sun, 10 Sep 2017 21:59:59 +0000 (16:59 -0500)
commit95319c10ab9895438fdb0cb1f50280d5f1c6c837
treeecd33719a0345102596eeb2a9530e04314e515ab
parent4a37db6ba2bf4d468f53c6b37ce48d6c1cc717cd
UBUNTU: SAUCE: powerpc/powernv: Clear LPCR[PECE1] via stop-api only for deep state offline

BugLink: http://bugs.launchpad.net/bugs/1715064
commit 24be85a23d1f ("powerpc/powernv: Clear PECE1 in LPCR via
stop-api only on Hotplug") clears the PECE1 bit of the LPCR via
stop-api during CPU-Hotplug to prevent wakeup due to a decrementer on
an offlined CPU which is in a deep stop state.

In the case where the stop-api support is found to be lacking, the
commit 785a12afdb4a ("powerpc/powernv/idle: Disable LOSE_FULL_CONTEXT
states when stop-api fails") disables deep states that lose hypervisor
context. Thus in this case, the offlined CPU will be put to some
shallow idle state.

However, we currently unconditionally clear the PECE1 in LPCR via
stop-api during CPU-Hotplug even when deep states are disabled due to
stop-api failure.

Fix this by clearing PECE1 of LPCR via stop-api during CPU-Hotplug
*only* when the offlined CPU will be put to a deep state that loses
hypervisor context.

Fixes: commit 24be85a23d1f ("powerpc/powernv: Clear PECE1 in LPCR via
stop-api only on Hotplug")

Reported-by: Pavithra Prakash <pavirampu@linux.vnet.ibm.com>
Signed-off-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
(Applied from mailing list patch https://patchwork.ozlabs.org/patch/808233/)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
arch/powerpc/platforms/powernv/idle.c