[Skiboot] [PATCH 01/11] hw/sbe-p9: Move seq increment from queue to submit
Nicholas Piggin
npiggin at gmail.com
Sat Nov 16 15:07:17 AEDT 2024
The sequence number is a low level SBE hardware detail, so it can
be assigned later when the message is being sent to the SBE. This
allows SBE messages to be sent without queueing in special cases.
Signed-off-by: Nicholas Piggin <npiggin at gmail.com>
---
hw/sbe-p9.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/hw/sbe-p9.c b/hw/sbe-p9.c
index 3b0f8b06e..03934b716 100644
--- a/hw/sbe-p9.c
+++ b/hw/sbe-p9.c
@@ -265,6 +265,12 @@ static int p9_sbe_msg_send(struct p9_sbe *sbe, struct p9_sbe_msg *msg)
int rc, i;
u64 addr, *data;
+ msg->reg[0] = msg->reg[0] | ((u64)sbe->cur_seq << 16);
+ sbe->cur_seq++;
+ /* Reset sequence number */
+ if (sbe->cur_seq == 0xffff)
+ sbe->cur_seq = 1;
+
addr = PSU_HOST_SBE_MBOX_REG0;
data = &msg->reg[0];
@@ -411,12 +417,6 @@ int p9_sbe_queue_msg(u32 chip_id, struct p9_sbe_msg *msg,
/* Set completion and update sequence number */
msg->complete = comp;
msg->state = sbe_msg_queued;
- msg->reg[0] = msg->reg[0] | ((u64)sbe->cur_seq << 16);
- sbe->cur_seq++;
-
- /* Reset sequence number */
- if (sbe->cur_seq == 0xffff)
- sbe->cur_seq = 1;
/* Add message to queue */
list_add_tail(&sbe->msg_list, &msg->link);
--
2.45.2
More information about the Skiboot
mailing list