summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorDoug Gilbert <dgilbert@us.ibm.com>2013-12-19 14:25:06 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-01-10 17:04:25 -0600
commit613d36e02e5ce4e5b69cbb02483e9fa352666ecd (patch)
tree7a17f70f9a5b33ab4ddd6acebb8d0f4ff135594a /src/usr
parent7df8e6fc5362bb57e49b2e7d8e256cac2785e726 (diff)
downloadtalos-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')
-rw-r--r--src/usr/intr/intrrp.C14
-rw-r--r--src/usr/mbox/mailboxsp.C16
2 files changed, 22 insertions, 8 deletions
diff --git a/src/usr/intr/intrrp.C b/src/usr/intr/intrrp.C
index 21b5e81d4..447a75929 100644
--- a/src/usr/intr/intrrp.C
+++ b/src/usr/intr/intrrp.C
@@ -207,7 +207,7 @@ errlHndl_t IntrRp::_init()
KernelIpc::ipc_data_area.pir = iv_masterCpu.word;
KernelIpc::ipc_data_area.hrmor_base = hrmor_base;
- KernelIpc::ipc_data_area.msg_queue_id = 0;
+ KernelIpc::ipc_data_area.msg_queue_id = IPC_DATA_AREA_CLEAR;
// Set the BAR scom reg
err = setBAR(procTarget,iv_masterCpu);
@@ -453,6 +453,18 @@ void IntrRp::msgHandler()
// Writing the XIRR with the same value read earlier
// tells the interrupt presenter hardware to signal an EOI.
*xirrAddress = xirr;
+
+ // indicate IPC data area clear after EOI has been sent
+ if (type == INTERPROC_XISR)
+ {
+ if(KernelIpc::ipc_data_area.msg_queue_id ==
+ IPC_DATA_AREA_READ)
+ {
+ KernelIpc::ipc_data_area.msg_queue_id =
+ IPC_DATA_AREA_CLEAR;
+ }
+ }
+
}
break;
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",
OpenPOWER on IntegriCloud