[Skiboot] [PATCH] core: Fix 'opal-runtime-size' property

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Wed Feb 28 20:59:08 AEDT 2018


We are populating 'opal-runtime-size' before calculating actual stack size.
Hence we endup having wrong runtime size (ex: on P9 it shows ~540MB while
actual size is around ~40MB). Note that only device tree property is shows
wrong value, but reserved-memory reflects correct size.

init_all_cpus() calculates and updates actual stack size. Hence move this
function call before add_opal_node().

Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
---
 core/init.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/core/init.c b/core/init.c
index 70e719124..ba80f61bb 100644
--- a/core/init.c
+++ b/core/init.c
@@ -938,6 +938,11 @@ void __noreturn __nomcount main_cpu_entry(const void *fdt)
 	/* Reserve HOMER and OCC area */
 	homer_init();
 
+	/* Initialize the rest of the cpu thread structs */
+	init_all_cpus();
+	if (proc_gen == proc_gen_p9)
+		cpu_set_ipi_enable(true);
+
 	/* Add the /opal node to the device-tree */
 	add_opal_node();
 
@@ -949,11 +954,6 @@ void __noreturn __nomcount main_cpu_entry(const void *fdt)
 	 */
 	probe_platform();
 
-	/* Initialize the rest of the cpu thread structs */
-	init_all_cpus();
-	if (proc_gen == proc_gen_p9)
-		cpu_set_ipi_enable(true);
-
 	/* Allocate our split trace buffers now. Depends add_opal_node() */
 	init_trace_buffers();
 
-- 
2.14.3



More information about the Skiboot mailing list