[Skiboot] [PATCH] init: Perform pstates-init before dt blob creation

Gautham R. Shenoy ego at linux.vnet.ibm.com
Wed Jul 10 22:29:19 AEST 2019


From: "Gautham R. Shenoy" <ego at linux.vnet.ibm.com>

On FSP based systems (particularly POWER8), we perform
occ_pstates_init() late in the boot to allow OCC to be loaded. Hence
this was being performed in platform.exit(). occ_pstates_init() would
add pstate information into the device-tree.

A recent commit 9fc0c1287ada ("Move FSP specific op-panel calls to
platform.exit()") moved the invocation of platform.exit() after the
creation of device-tree blob. As a result, on FSP based systems, we
don't have the pstate information in the device-tree, and thus the
Kernel is unable to perform frequency scaling.

Fix this by moving occ_pstates_init() out of ibm_fsp_exit() and call
it before the creation of the device-tree blob.

Fixes: commit 9fc0c1287ada ("Move FSP specific op-panel calls to
platform.exit()")

Signed-off-by: Gautham R. Shenoy <ego at linux.vnet.ibm.com>
---
 core/init.c                | 6 ++++++
 platforms/ibm-fsp/common.c | 7 -------
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/core/init.c b/core/init.c
index d0f28f2..8eb0729 100644
--- a/core/init.c
+++ b/core/init.c
@@ -557,6 +557,12 @@ void __noreturn load_and_boot_kernel(bool is_reboot)
 		if (!occ_sensors_init())
 			dts_sensor_create_nodes(sensor_node);
 
+		/*
+		 * OCC takes few secs to boot on FSP systems. Call
+		 * this as late as as possible to avoid delay.
+		 */
+		if (!platform.bmc)
+			occ_pstates_init();
 	} else {
 		/* fdt will be rebuilt */
 		free(fdt);
diff --git a/platforms/ibm-fsp/common.c b/platforms/ibm-fsp/common.c
index 7f7a1f2..6da25d1 100644
--- a/platforms/ibm-fsp/common.c
+++ b/platforms/ibm-fsp/common.c
@@ -186,13 +186,6 @@ void ibm_fsp_exit(void)
 	/* Wait for FW VPD data read to complete */
 	fsp_code_update_wait_vpd(true);
 
-	/*
-	 * OCC takes few secs to boot.  Call this as late as
-	 * as possible to avoid delay.
-	 */
-	if (fsp_present())
-		occ_pstates_init();
-
 	fsp_console_select_stdout();
 
 	op_panel_disable_src_echo();
-- 
1.9.4



More information about the Skiboot mailing list