diff mbox series

Disable fast-reset for POWER8

Message ID 20190503071230.23099-1-stewart@linux.ibm.com
State Accepted, archived
Headers show
Series Disable fast-reset for POWER8 | expand

Commit Message

Stewart Smith May 3, 2019, 7:12 a.m. UTC
There is a bug with fast-reset when CPU cores are busy, which can be
reproduced by running `stress` and then trying `reboot -ff` (this is
what the op-test test cases FastRebootHostStress and
FastRebootHostStressTorture do). What happens is the cores lock up,
which isn't the best thing in the world when you want them to start
executing instructions again.

A workaround is to use instruction ramming, which while greatly
increasing the reliability of fast-reset on p8, doesn't make it perfect.

Instruction ramming is what pdbg was modified to do in order to have the
sreset functionality work reliably on p8.
pdbg patches: https://patchwork.ozlabs.org/project/pdbg/list/?series=96593&state=*

Fixes: https://github.com/open-power/skiboot/issues/185
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
---
 core/platform.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

Comments

Stewart Smith May 3, 2019, 7:39 a.m. UTC | #1
Stewart Smith <stewart@linux.ibm.com> writes:
> There is a bug with fast-reset when CPU cores are busy, which can be
> reproduced by running `stress` and then trying `reboot -ff` (this is
> what the op-test test cases FastRebootHostStress and
> FastRebootHostStressTorture do). What happens is the cores lock up,
> which isn't the best thing in the world when you want them to start
> executing instructions again.
>
> A workaround is to use instruction ramming, which while greatly
> increasing the reliability of fast-reset on p8, doesn't make it perfect.
>
> Instruction ramming is what pdbg was modified to do in order to have the
> sreset functionality work reliably on p8.
> pdbg patches: https://patchwork.ozlabs.org/project/pdbg/list/?series=96593&state=*
>
> Fixes: https://github.com/open-power/skiboot/issues/185
> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
> ---
>  core/platform.c | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)

Probably only makes Oliver half happy, but merged as of 14f709b8eeda7e9ea7169b782e981c908de92e10
diff mbox series

Patch

diff --git a/core/platform.c b/core/platform.c
index 570a4309a23c..62361f55c758 100644
--- a/core/platform.c
+++ b/core/platform.c
@@ -59,9 +59,16 @@  static int64_t opal_cec_reboot(void)
 
 	opal_quiesce(QUIESCE_HOLD, -1);
 
-	/* Try fast-reset unless explicitly disabled */
-	if (!nvram_query_eq("fast-reset","0"))
+	if (proc_gen == proc_gen_p8 && nvram_query_eq("fast-reset","1")) {
+		/*
+		 * Bugs in P8 mean fast reboot isn't 100% reliable when cores
+		 * are busy, so only attempt if explicitly *enabled*.
+		 */
+		fast_reboot();
+	} else if (!nvram_query_eq("fast-reset","0")) {
+		/* Try fast-reset unless explicitly disabled */
 		fast_reboot();
+	}
 
 	console_complete_flush();