diff mbox series

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

Message ID 20210625061937.47314-18-hegdevasant@linux.vnet.ibm.com
State Accepted
Headers show
Series P9 cleanup and fixes | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success Successfully applied on branch master (5be38b672c1410e2f10acd3ad2eecfdc81d5daf7)
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot success Test snowpatch/job/snowpatch-skiboot on branch master
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot-dco success Signed-off-by present

Commit Message

Vasant Hegde June 25, 2021, 6:19 a.m. UTC
From: Oliver O'Halloran <oohall@gmail.com>

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

Patch

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 */