[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 41/47] ipmi_bmc_sim: Remove an unnecessary mutex
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 41/47] ipmi_bmc_sim: Remove an unnecessary mutex |
Date: |
Sun, 30 Oct 2016 23:25:15 +0200 |
From: Corey Minyard <address@hidden>
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 <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
hw/ipmi/ipmi_bmc_sim.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/hw/ipmi/ipmi_bmc_sim.c b/hw/ipmi/ipmi_bmc_sim.c
index a0282cb..c7883d6 100644
--- a/hw/ipmi/ipmi_bmc_sim.c
+++ b/hw/ipmi/ipmi_bmc_sim.c
@@ -217,7 +217,6 @@ struct IPMIBmcSim {
/* Odd netfns are for responses, so we only need the even ones. */
const IPMINetfn *netfns[MAX_NETFNS / 2];
- QemuMutex lock;
/* We allow one event in the buffer */
uint8_t evtbuf[16];
@@ -940,7 +939,6 @@ static void get_msg(IPMIBmcSim *ibs,
{
IPMIRcvBufEntry *msg;
- qemu_mutex_lock(&ibs->lock);
if (QTAILQ_EMPTY(&ibs->rcvbufs)) {
rsp_buffer_set_error(rsp, 0x80); /* Queue empty */
goto out;
@@ -960,7 +958,6 @@ static void get_msg(IPMIBmcSim *ibs,
}
out:
- qemu_mutex_unlock(&ibs->lock);
return;
}
@@ -1055,11 +1052,9 @@ static void send_msg(IPMIBmcSim *ibs,
end_msg:
msg->buf[msg->len] = ipmb_checksum(msg->buf, msg->len, 0);
msg->len++;
- qemu_mutex_lock(&ibs->lock);
QTAILQ_INSERT_TAIL(&ibs->rcvbufs, msg, entry);
ibs->msg_flags |= IPMI_BMC_MSG_FLAG_RCV_MSG_QUEUE;
k->set_atn(s, 1, attn_irq_enabled(ibs));
- qemu_mutex_unlock(&ibs->lock);
}
static void do_watchdog_reset(IPMIBmcSim *ibs)
@@ -1753,7 +1748,6 @@ static void ipmi_sim_realize(DeviceState *dev, Error
**errp)
unsigned int i;
IPMIBmcSim *ibs = IPMI_BMC_SIMULATOR(b);
- qemu_mutex_init(&ibs->lock);
QTAILQ_INIT(&ibs->rcvbufs);
ibs->bmc_global_enables = (1 << IPMI_BMC_EVENT_LOG_BIT);
--
MST
- [Qemu-devel] [PULL 33/47] nvdimm acpi: compile nvdimm acpi code arch-independently, (continued)
- [Qemu-devel] [PULL 38/47] nvdimm acpi: introduce _FIT, Michael S. Tsirkin, 2016/10/30
- [Qemu-devel] [PULL 39/47] pc: memhp: enable nvdimm device hotplug, Michael S. Tsirkin, 2016/10/30
- [Qemu-devel] [PULL 40/47] ipmi: Remove hotplug from IPMI BMCs, Michael S. Tsirkin, 2016/10/30
- [Qemu-devel] [PULL 41/47] ipmi_bmc_sim: Remove an unnecessary mutex,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 42/47] ipmi: chassis poweroff should use qemu_system_shutdown_request(), Michael S. Tsirkin, 2016/10/30
- [Qemu-devel] [PULL 43/47] ipmi: Implement shutdown via ACPI overtemp, Michael S. Tsirkin, 2016/10/30
- [Qemu-devel] [PULL 44/47] ipmi: fix build config variable name for ipmi_bmc_extern.o, Michael S. Tsirkin, 2016/10/30
- [Qemu-devel] [PULL 45/47] ipmi: Add graceful shutdown handling to the external BMC, Michael S. Tsirkin, 2016/10/30
- [Qemu-devel] [PULL 47/47] acpi: fix assert failure caused by commit 35c5a52d, Michael S. Tsirkin, 2016/10/30
- [Qemu-devel] [PULL 46/47] acpi/ipmi: Initialize the fwinfo before fetching it, Michael S. Tsirkin, 2016/10/30
- Re: [Qemu-devel] [PULL 00/47] virtio, pc: fixes and features, Igor Mammedov, 2016/10/31