diff mbox

[4/4] fast-reboot: Use fast reboot when enabled in NVRAM

Message ID 1475038592-24094-4-git-send-email-oohall@gmail.com
State Superseded
Headers show

Commit Message

Oliver O'Halloran Sept. 28, 2016, 4:56 a.m. UTC
Adds a check for the "fast-reboot" config string. When set to "enabled"
Skiboot will handle the OPAL_CEC_REBOOT OPAL call.

Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
---
 core/platform.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Comments

Stewart Smith Oct. 16, 2016, 11:49 p.m. UTC | #1
Oliver O'Halloran <oohall@gmail.com> writes:
> Adds a check for the "fast-reboot" config string. When set to "enabled"
> Skiboot will handle the OPAL_CEC_REBOOT OPAL call.
>
> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>

I merged something slightly different as part of the fast-reset patch in 0279d8951ead549fdebce93130a2f6c673081862
diff mbox

Patch

diff --git a/core/platform.c b/core/platform.c
index 76729141ffac..a213a8313046 100644
--- a/core/platform.c
+++ b/core/platform.c
@@ -24,6 +24,7 @@ 
 #include <xscom.h>
 #include <errorlog.h>
 #include <bt.h>
+#include <nvram.h>
 
 bool manufacturing_mode = false;
 struct platform	platform;
@@ -54,10 +55,10 @@  static int64_t opal_cec_reboot(void)
 
 	console_complete_flush();
 
-#ifdef ENABLE_FAST_RESET
 	/* Try a fast reset first */
-	fast_reset();
-#endif
+	if (nvram_query_eq("fast-reboot", "enabled"))
+		fast_reset();
+
 	if (platform.cec_reboot)
 		return platform.cec_reboot();