[Skiboot] [PATCH 03/11] hw/sbe-p9: Add error message for unexpected msg list state

Nicholas Piggin npiggin at gmail.com
Sat Nov 16 15:07:19 AEDT 2024


SBE message acks should always apply to the first message in the list,
if the message list is empty this would be a bug, so print an error
message in that case.

Signed-off-by: Nicholas Piggin <npiggin at gmail.com>
---
 hw/sbe-p9.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/hw/sbe-p9.c b/hw/sbe-p9.c
index 89efbec09..4eafd24fd 100644
--- a/hw/sbe-p9.c
+++ b/hw/sbe-p9.c
@@ -344,8 +344,11 @@ static void p9_sbe_send_complete(struct p9_sbe *sbe)
 {
 	struct p9_sbe_msg *msg;
 
-	if (list_empty(&sbe->msg_list))
+	if (list_empty(&sbe->msg_list)) {
+		prlog(PR_ERR, "SBE ACK on empty msg_list [chip id = %x]\n",
+		              sbe->chip_id);
 		return;
+	}
 
 	msg = list_top(&sbe->msg_list, struct p9_sbe_msg, link);
 	/* Need response */
-- 
2.45.2



More information about the Skiboot mailing list