[Skiboot] [PATCH 12/17] fast-reboot: move platform specific bits to a platform call

Stewart Smith stewart at linux.ibm.com
Tue Jun 18 17:29:20 AEST 2019


Signed-off-by: Stewart Smith <stewart at linux.ibm.com>
---
 core/fast-reboot.c          | 4 ++--
 include/platform.h          | 5 +++++
 platforms/ibm-fsp/firenze.c | 1 +
 platforms/ibm-fsp/zz.c      | 1 +
 4 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/core/fast-reboot.c b/core/fast-reboot.c
index 07f83a30f2dc..35c9a2b748c8 100644
--- a/core/fast-reboot.c
+++ b/core/fast-reboot.c
@@ -433,8 +433,8 @@ void __noreturn fast_reboot_entry(void)
 	/* Start clearing memory */
 	start_mem_region_clear_unused();
 
-	/* Poke the consoles (see comments in the code there) */
-	fsp_console_reset();
+	if (platform.fast_reboot_init)
+		platform.fast_reboot_init();
 
 	if (proc_gen == proc_gen_p8) {
 		/* XXX */
diff --git a/include/platform.h b/include/platform.h
index 9a77586a9cbf..1a12718fb80d 100644
--- a/include/platform.h
+++ b/include/platform.h
@@ -124,6 +124,11 @@ struct platform {
 	 */
 	void		(*init)(void);
 
+	/*
+	 * Called once every thread is back in skiboot as part of fast reboot.
+	 */
+	void		(*fast_reboot_init)(void);
+
 	/*
 	 * These are used to power down and reboot the machine
 	 */
diff --git a/platforms/ibm-fsp/firenze.c b/platforms/ibm-fsp/firenze.c
index 8f6a3921b2f6..578bd1547b13 100644
--- a/platforms/ibm-fsp/firenze.c
+++ b/platforms/ibm-fsp/firenze.c
@@ -211,6 +211,7 @@ DECLARE_PLATFORM(firenze) = {
 	.name			= "Firenze",
 	.probe			= firenze_probe,
 	.init			= firenze_init,
+	.fast_reboot_init	= fsp_console_reset,
 	.exit			= ibm_fsp_exit,
 	.cec_power_down		= ibm_fsp_cec_power_down,
 	.cec_reboot		= ibm_fsp_cec_reboot,
diff --git a/platforms/ibm-fsp/zz.c b/platforms/ibm-fsp/zz.c
index 09599f85e842..c5ce01e4edc8 100644
--- a/platforms/ibm-fsp/zz.c
+++ b/platforms/ibm-fsp/zz.c
@@ -73,6 +73,7 @@ DECLARE_PLATFORM(zz) = {
 	.name			= "ZZ",
 	.probe			= zz_probe,
 	.init			= zz_init,
+	.fast_reboot_init	= fsp_console_reset,
 	.exit			= ibm_fsp_exit,
 	.cec_power_down		= ibm_fsp_cec_power_down,
 	.cec_reboot		= ibm_fsp_cec_reboot,
-- 
2.21.0



More information about the Skiboot mailing list