diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2025-01-14 21:46:42 +1000 |
---|---|---|
committer | Reza Arbab <arbab@linux.ibm.com> | 2025-01-15 15:15:50 -0600 |
commit | de5f1a276fff0c1eb36fd5ffa5c938ae552d91c4 (patch) | |
tree | 155a2976ef4942aae8bf3823abba4f3b2b1cbfef | |
parent | 673de707c203a6e21c91b36a44c707d9b3f7b822 (diff) | |
download | skiboot-de5f1a276fff0c1eb36fd5ffa5c938ae552d91c4.zip skiboot-de5f1a276fff0c1eb36fd5ffa5c938ae552d91c4.tar.gz skiboot-de5f1a276fff0c1eb36fd5ffa5c938ae552d91c4.tar.bz2 |
hw/sbe-p9: Move seq increment from queue to submit
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@gmail.com>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
-rw-r--r-- | hw/sbe-p9.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/hw/sbe-p9.c b/hw/sbe-p9.c index 7a5f539..42f0de3 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); |