[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 10/14] s390x/css: Use static initialization for chann
From: |
Cornelia Huck |
Subject: |
[Qemu-devel] [PULL 10/14] s390x/css: Use static initialization for channel_subsys fields |
Date: |
Tue, 1 Mar 2016 12:52:59 +0100 |
From: Eduardo Habkost <address@hidden>
machine_init() will be gone, but we don't need it if we just
initialize the channel_subsys fields statically.
Cc: Cornelia Huck <address@hidden>
Cc: Christian Borntraeger <address@hidden>
Cc: Richard Henderson <address@hidden>
Cc: Alexander Graf <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Cornelia Huck <address@hidden>
[adapted on top of indicator changes]
Signed-off-by: Cornelia Huck <address@hidden>
---
hw/s390x/css.c | 25 +++++++++++--------------
1 file changed, 11 insertions(+), 14 deletions(-)
diff --git a/hw/s390x/css.c b/hw/s390x/css.c
index 3b16c82..55cb26a 100644
--- a/hw/s390x/css.c
+++ b/hw/s390x/css.c
@@ -63,7 +63,17 @@ typedef struct ChannelSubSys {
QTAILQ_HEAD(, IndAddr) indicator_addresses;
} ChannelSubSys;
-static ChannelSubSys channel_subsys;
+static ChannelSubSys channel_subsys = {
+ .pending_crws = QTAILQ_HEAD_INITIALIZER(channel_subsys.pending_crws),
+ .do_crw_mchk = true,
+ .sei_pending = false,
+ .do_crw_mchk = true,
+ .crws_lost = false,
+ .chnmon_active = false,
+ .io_adapters = QTAILQ_HEAD_INITIALIZER(channel_subsys.io_adapters),
+ .indicator_addresses =
+ QTAILQ_HEAD_INITIALIZER(channel_subsys.indicator_addresses),
+};
IndAddr *get_indicator(hwaddr ind_addr, int len)
{
@@ -1576,19 +1586,6 @@ int subch_device_load(SubchDev *s, QEMUFile *f)
return 0;
}
-
-static void css_init(void)
-{
- QTAILQ_INIT(&channel_subsys.pending_crws);
- channel_subsys.sei_pending = false;
- channel_subsys.do_crw_mchk = true;
- channel_subsys.crws_lost = false;
- channel_subsys.chnmon_active = false;
- QTAILQ_INIT(&channel_subsys.io_adapters);
- QTAILQ_INIT(&channel_subsys.indicator_addresses);
-}
-machine_init(css_init);
-
void css_reset_sch(SubchDev *sch)
{
PMCW *p = &sch->curr_status.pmcw;
--
2.7.2
- [Qemu-devel] [PULL 08/14] s390x/pci: fix reg/dereg irq functions, (continued)
- [Qemu-devel] [PULL 08/14] s390x/pci: fix reg/dereg irq functions, Cornelia Huck, 2016/03/01
- [Qemu-devel] [PULL 09/14] s390x/css: Allocate channel_subsys statically, Cornelia Huck, 2016/03/01
- [Qemu-devel] [PULL 11/14] s390x/pci: use PCI_MSIX_FLAGS on retrieving the MSIX entries, Cornelia Huck, 2016/03/01
- [Qemu-devel] [PULL 13/14] MAINTAINERS: Remove entry for hw/s390x/s390-virtio-bus.[ch], Cornelia Huck, 2016/03/01
- [Qemu-devel] [PULL 04/14] s390x: remove {kvm_}s390_virtio_irq(), Cornelia Huck, 2016/03/01
- [Qemu-devel] [PULL 14/14] s390x/css: only suspend when enabled by orb, Cornelia Huck, 2016/03/01
- [Qemu-devel] [PULL 06/14] s390x/virtio: old machine leftovers, Cornelia Huck, 2016/03/01
- [Qemu-devel] [PULL 01/14] linux-headers: update against kvm/next, Cornelia Huck, 2016/03/01
- [Qemu-devel] [PULL 12/14] MAINTAINERS: Remove the old s390-virtio machine, Cornelia Huck, 2016/03/01
- [Qemu-devel] [PULL 07/14] s390x/css: introduce indicator refcounting interfaces, Cornelia Huck, 2016/03/01
- [Qemu-devel] [PULL 10/14] s390x/css: Use static initialization for channel_subsys fields,
Cornelia Huck <=
- Re: [Qemu-devel] [PULL 00/14] s390x patches, Peter Maydell, 2016/03/01