diff options
author | Oliver O'Halloran <oohall@gmail.com> | 2019-07-29 17:28:04 +1000 |
---|---|---|
committer | Oliver O'Halloran <oohall@gmail.com> | 2019-08-02 15:23:32 +1000 |
commit | e9a30df78f88085fdaaad96167af5eb21803c222 (patch) | |
tree | ba0fc4120c4d75fd1a988d2a0f39531e0d5c9c37 | |
parent | a7c613ebf0fb0242d892e8f183e1a0533cb1d549 (diff) | |
download | skiboot-e9a30df78f88085fdaaad96167af5eb21803c222.zip skiboot-e9a30df78f88085fdaaad96167af5eb21803c222.tar.gz skiboot-e9a30df78f88085fdaaad96167af5eb21803c222.tar.bz2 |
hw/sbe-p9: Fix multi-line log messages
When sending messages to the SBE we log the message using a multi-line
log message that looks like this:
[ 96.390873752,8] SBE: Message queued [chip id = 0x0]:
Reg0 : 000002010054d401
Reg1 : 0000000000030d40
Reg2 : 0000000000000000
Reg3 : 0000000000000000
The lack of a common prefix makes the log messages annoying to deal with
since you can just grep for SBE: to get all the SBE related messages,
and you can't use grep -v to remove them. There's no real benifit to
squashing all this into a single prlog() call, so use a for loop to
print the registers. With this patch the output is:
[ 93.253511545,8] SBE: Message queued [chip id = 0x0]:
[ 93.253512343,8] SBE: Reg0 : 000002010059d401
[ 93.253513167,8] SBE: Reg1 : 0000000000030d40
[ 93.253513894,8] SBE: Reg2 : 0000000000000000
[ 93.253514627,8] SBE: Reg3 : 0000000000000000
Cc: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Acked-by: Stewart Smith <stewart@linux.ibm.com>
Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
-rw-r--r-- | hw/sbe-p9.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/sbe-p9.c b/hw/sbe-p9.c index 852d8f3..aaf688f 100644 --- a/hw/sbe-p9.c +++ b/hw/sbe-p9.c @@ -273,9 +273,9 @@ static int p9_sbe_msg_send(struct p9_sbe *sbe, struct p9_sbe_msg *msg) if (rc != OPAL_SUCCESS) return rc; - prlog(PR_TRACE, "Message queued [chip id = 0x%x]:\n\t Reg0 : %016llx" - "\n\t Reg1 : %016llx\n\t Reg2 : %016llx\n\t Reg3 : %016llx\n", - sbe->chip_id, msg->reg[0], msg->reg[1], msg->reg[2], msg->reg[3]); + prlog(PR_TRACE, "Message queued [chip id = 0x%x]:\n", sbe->chip_id); + for (i = 0; i < 4; i++) + prlog(PR_TRACE, " Reg%d : %016llx\n", i, msg->reg[i]); msg->timeout = mftb() + msecs_to_tb(SBE_CMD_TIMEOUT_MAX); sbe->state = sbe_mbox_send; |