]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/powernv: Clear LPCR[PECE1] via stop-api only for deep state offline
authorGautham R. Shenoy <ego@linux.vnet.ibm.com>
Thu, 31 Aug 2017 11:47:41 +0000 (17:17 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 20 Sep 2017 03:30:09 +0000 (13:30 +1000)
commit7b753a12b86ba56a803a790f8d023755f11abcd1
treeadc0c98a8a7f50cb457bc2525e4a6cb94e81ddfd
parent94b638d63bb5658c2d3c57a25ef2b5facd33cca9
powerpc/powernv: Clear LPCR[PECE1] via stop-api only for deep state offline

Commit e64b26e085ca ("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 595f26ad07f4 ("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: e64b26e085ca ("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>
Tested-by: Pavithra Prakash <pavrampu@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/powernv/idle.c