[Skiboot] [PATCH v3 27/29] fast-reboot: move boot CPU cleanup logically together with secondaries

Nicholas Piggin npiggin at gmail.com
Wed Nov 29 16:37:05 AEDT 2017


Move the boot CPU cleanup and state transition to active, logically
together with secondaries. Don't release secondaries from fast reboot
hold until everyone has cleaned up and transitioned to active.

This is cosmetic, but it is helpful to run the fast reboot state machine
the same way on all CPUs.

Signed-off-by: Nicholas Piggin <npiggin at gmail.com>
---
 core/fast-reboot.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/core/fast-reboot.c b/core/fast-reboot.c
index 83328eb97..2f1a50058 100644
--- a/core/fast-reboot.c
+++ b/core/fast-reboot.c
@@ -291,6 +291,14 @@ void __noreturn fast_reboot_entry(void)
 	sync();
 	fast_boot_release = true;
 
+	/* Cleanup ourselves */
+	cleanup_cpu_state();
+
+	/* Set our state to active */
+	sync();
+	this_cpu()->state = cpu_state_active;
+	sync();
+
 	/* Wait for them to respond */
 	cpu_state_wait_all_others(cpu_state_active, 0);
 
@@ -301,14 +309,6 @@ void __noreturn fast_reboot_entry(void)
 	/* Clear release flag for next time */
 	fast_boot_release = false;
 
-	/* Cleanup ourselves */
-	cleanup_cpu_state();
-
-	/* Set our state to active */
-	sync();
-	this_cpu()->state = cpu_state_active;
-	sync();
-
 	/* Let the CPU layer do some last minute global cleanups */
 	cpu_fast_reboot_complete();
 
-- 
2.15.0



More information about the Skiboot mailing list