diff options
author | Doug Gilbert <dgilbert@us.ibm.com> | 2013-12-19 14:25:06 -0600 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2014-01-10 17:04:25 -0600 |
commit | 613d36e02e5ce4e5b69cbb02483e9fa352666ecd (patch) | |
tree | 7a17f70f9a5b33ab4ddd6acebb8d0f4ff135594a /src/usr/mbox/mailboxsp.C | |
parent | 7df8e6fc5362bb57e49b2e7d8e256cac2785e726 (diff) | |
download | talos-hostboot-613d36e02e5ce4e5b69cbb02483e9fa352666ecd.tar.gz talos-hostboot-613d36e02e5ce4e5b69cbb02483e9fa352666ecd.zip |
IPC deadlock
CQ: SW239987
Change-Id: I2a33e767916cd80ae3b4acc604104963cbc648ac
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/7828
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/mbox/mailboxsp.C')
-rw-r--r-- | src/usr/mbox/mailboxsp.C | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/usr/mbox/mailboxsp.C b/src/usr/mbox/mailboxsp.C index 8b63fda00..de3a8e23e 100644 --- a/src/usr/mbox/mailboxsp.C +++ b/src/usr/mbox/mailboxsp.C @@ -1401,23 +1401,25 @@ void MailboxSp::handleIPC() // All IPC messages are secure uint64_t msg_q_id = KernelIpc::ipc_data_area.msg_queue_id; - // msg_q_id == 0 means no IPC message available - // msg_q_id == (all ones) means message incomming, but not ready and - // not associated with this interupt - if(msg_q_id == 0xFFFFFFFFFFFFFFFFul) + // msg_q_id == IPC_DATA_AREA_CLEAR means no IPC message available + // msg_q_id == IPC_DATA_AREA_LOCKED means message incomming, but not ready + // to be read and not associated with this interupt + if(msg_q_id == IPC_DATA_AREA_LOCKED) { - msg_q_id = 0; + msg_q_id = IPC_DATA_AREA_CLEAR; } // destination message queue id is lower 32 bits. msg_q_id &= 0x00000000FFFFFFFFull; - if(0 != msg_q_id) + if(IPC_DATA_AREA_CLEAR != msg_q_id) { msg_t * msg = msg_allocate(); isync(); *msg = KernelIpc::ipc_data_area.msg_payload; lwsync(); - KernelIpc::ipc_data_area.msg_queue_id = 0; // set ready for next msg + + // Signal message has been read, but keep locked/not ready for new msg + KernelIpc::ipc_data_area.msg_queue_id = IPC_DATA_AREA_READ; TRACFCOMP(g_trac_mboxmsg, "MBOXSP IPC RECV MSG: msg_id:0x%08x", |