mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 18:23:57 -06:00
ipmi_bmc_sim: Remove an unnecessary mutex
Get rid of the unnecessary mutex, it was a vestige of something else that was not done. That way we don't have to free it. Signed-off-by: Corey Minyard <cminyard@mvista.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
66abfddb28
commit
0eb4d4eee1
1 changed files with 0 additions and 6 deletions
|
@ -217,7 +217,6 @@ struct IPMIBmcSim {
|
||||||
/* Odd netfns are for responses, so we only need the even ones. */
|
/* Odd netfns are for responses, so we only need the even ones. */
|
||||||
const IPMINetfn *netfns[MAX_NETFNS / 2];
|
const IPMINetfn *netfns[MAX_NETFNS / 2];
|
||||||
|
|
||||||
QemuMutex lock;
|
|
||||||
/* We allow one event in the buffer */
|
/* We allow one event in the buffer */
|
||||||
uint8_t evtbuf[16];
|
uint8_t evtbuf[16];
|
||||||
|
|
||||||
|
@ -940,7 +939,6 @@ static void get_msg(IPMIBmcSim *ibs,
|
||||||
{
|
{
|
||||||
IPMIRcvBufEntry *msg;
|
IPMIRcvBufEntry *msg;
|
||||||
|
|
||||||
qemu_mutex_lock(&ibs->lock);
|
|
||||||
if (QTAILQ_EMPTY(&ibs->rcvbufs)) {
|
if (QTAILQ_EMPTY(&ibs->rcvbufs)) {
|
||||||
rsp_buffer_set_error(rsp, 0x80); /* Queue empty */
|
rsp_buffer_set_error(rsp, 0x80); /* Queue empty */
|
||||||
goto out;
|
goto out;
|
||||||
|
@ -960,7 +958,6 @@ static void get_msg(IPMIBmcSim *ibs,
|
||||||
}
|
}
|
||||||
|
|
||||||
out:
|
out:
|
||||||
qemu_mutex_unlock(&ibs->lock);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1055,11 +1052,9 @@ static void send_msg(IPMIBmcSim *ibs,
|
||||||
end_msg:
|
end_msg:
|
||||||
msg->buf[msg->len] = ipmb_checksum(msg->buf, msg->len, 0);
|
msg->buf[msg->len] = ipmb_checksum(msg->buf, msg->len, 0);
|
||||||
msg->len++;
|
msg->len++;
|
||||||
qemu_mutex_lock(&ibs->lock);
|
|
||||||
QTAILQ_INSERT_TAIL(&ibs->rcvbufs, msg, entry);
|
QTAILQ_INSERT_TAIL(&ibs->rcvbufs, msg, entry);
|
||||||
ibs->msg_flags |= IPMI_BMC_MSG_FLAG_RCV_MSG_QUEUE;
|
ibs->msg_flags |= IPMI_BMC_MSG_FLAG_RCV_MSG_QUEUE;
|
||||||
k->set_atn(s, 1, attn_irq_enabled(ibs));
|
k->set_atn(s, 1, attn_irq_enabled(ibs));
|
||||||
qemu_mutex_unlock(&ibs->lock);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void do_watchdog_reset(IPMIBmcSim *ibs)
|
static void do_watchdog_reset(IPMIBmcSim *ibs)
|
||||||
|
@ -1753,7 +1748,6 @@ static void ipmi_sim_realize(DeviceState *dev, Error **errp)
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
IPMIBmcSim *ibs = IPMI_BMC_SIMULATOR(b);
|
IPMIBmcSim *ibs = IPMI_BMC_SIMULATOR(b);
|
||||||
|
|
||||||
qemu_mutex_init(&ibs->lock);
|
|
||||||
QTAILQ_INIT(&ibs->rcvbufs);
|
QTAILQ_INIT(&ibs->rcvbufs);
|
||||||
|
|
||||||
ibs->bmc_global_enables = (1 << IPMI_BMC_EVENT_LOG_BIT);
|
ibs->bmc_global_enables = (1 << IPMI_BMC_EVENT_LOG_BIT);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue