[Skiboot] [PATCH 17/22] fast-reboot: Fix the bonus cleanup_cpu_state()

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Fri Jun 25 16:19:32 AEST 2021


From: Oliver O'Halloran <oohall at gmail.com>

Signed-off-by: Oliver O'Halloran <oohall at gmail.com>
Signed-off-by: Cédric Le Goater <clg at kaod.org>
Signed-off-by: Vaidyanathan Srinivasan <svaidy at linux.ibm.com>
---
 core/fast-reboot.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/core/fast-reboot.c b/core/fast-reboot.c
index 03777543a..ac9b3b284 100644
--- a/core/fast-reboot.c
+++ b/core/fast-reboot.c
@@ -264,8 +264,11 @@ static void cleanup_cpu_state(void)
 		xive_cpu_reset();
 
 	/* Per core cleanup */
-	if (cpu_is_thread0(cpu)) {
-		/* XXX should reset the SLW SPR restore values*/
+	if (cpu_is_thread0(cpu) || cpu_is_core_chiplet_primary(cpu)) {
+		/* Shared SPRs whacked back to normal */
+
+		/* XXX Update the SLW copies ! Also dbl check HIDs etc... */
+		init_shared_sprs();
 
 		if (proc_gen == proc_gen_p8) {
 			/* If somebody was in fast_sleep, we may have a
@@ -286,6 +289,11 @@ static void cleanup_cpu_state(void)
 		/* And we might have lost TB sync */
 		chiptod_wakeup_resync();
 	}
+
+	/* Per-thread additional cleanup */
+	init_replicated_sprs();
+
+	// XXX Cleanup SLW, check HIDs ...
 }
 
 /* Entry from asm after a fast reset */
-- 
2.31.1



More information about the Skiboot mailing list