diff mbox

core/init: Fix failure of getting node in the free list.

Message ID 1471776902-3151-1-git-send-email-ppaidipe@linux.vnet.ibm.com
State Accepted
Headers show

Commit Message

ppaidipe Aug. 21, 2016, 10:55 a.m. UTC
From: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com>

Currently we are getting request to queue occ load opal message when host services
got load occ request from FSP. This request we got before initializing opal messaging
due to which we are failed to get list node from msg_free_list list.

[3204300512,3] opalmsg: No available node in the free list, allocating

This patch fixes this issue by initializing opal messaging(opal_init_msg) before
platform.init, as in platform.init we are loading host services lid and getting
occ load request command from FSP. So when opal_init_msg initializes we will
be initialized msg_free_list with an empty list.

Signed-off-by: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com>
---
 core/init.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

Comments

Stewart Smith Sept. 28, 2016, 7:09 a.m. UTC | #1
ppaidipe@linux.vnet.ibm.com writes:
> From: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com>
>
> Currently we are getting request to queue occ load opal message when host services
> got load occ request from FSP. This request we got before initializing opal messaging
> due to which we are failed to get list node from msg_free_list list.
>
> [3204300512,3] opalmsg: No available node in the free list, allocating
>
> This patch fixes this issue by initializing opal messaging(opal_init_msg) before
> platform.init, as in platform.init we are loading host services lid and getting
> occ load request command from FSP. So when opal_init_msg initializes we will
> be initialized msg_free_list with an empty list.

Thanks!

Works and looks safe. Merged to master as of
564ed2a8caadc6b4e858bc7933131ed27ba9f13a

I think this clears us up to eliminate the allocation of new messages
and instead throw an error - as continually allocating them has led us
down a bad path in the past.
diff mbox

Patch

diff --git a/core/init.c b/core/init.c
index 86bcdea..decad2b 100644
--- a/core/init.c
+++ b/core/init.c
@@ -746,6 +746,13 @@  void __noreturn main_cpu_entry(const void *fdt, u32 master_cpu)
 	/* Register routine to dispatch and read sensors */
 	sensor_init();
 
+        /*
+	 * Initialize the opal messaging before platform.init as we are
+	 *  getting request to queue occ load opal message when host services
+	 *  got load occ request from FSP
+	 */
+        opal_init_msg();
+
 	/*
 	 * We have initialized the basic HW, we can now call into the
 	 * platform to perform subsequent inits, such as establishing
@@ -773,9 +780,6 @@  void __noreturn main_cpu_entry(const void *fdt, u32 master_cpu)
 	/* NX init */
 	nx_init();
 
-	/* Initialize the opal messaging */
-	opal_init_msg();
-
 	/* Probe IO hubs */
 	probe_p7ioc();