ipm_quark_se: don't wait for response with interrupts locked

If the remote handler tries to send a message back with wait enabled
it can lead to a deadlock.

Change-Id: Ife6eae29c10e8937abd1b6511ee605f7786c6a7a
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2016-01-06 13:57:54 -08:00 committed by Anas Nashif
commit 4f0f7e3325

View file

@ -135,13 +135,13 @@ static int quark_se_ipm_send(struct device *d, int wait, uint32_t id,
/* Wait for HW to set the sts bit */
while (ipm->sts.sts == 0) {
}
irq_unlock(flags);
if (wait) {
/* Loop until remote clears the status bit */
while (ipm->sts.sts != 0) {
}
}
irq_unlock(flags);
return 0;
}