diff options
author | Jing Liu | 2015-11-06 12:32:40 +0100 |
---|---|---|
committer | Cornelia Huck | 2016-07-11 09:48:05 +0200 |
commit | dd70bd0d4cf2e10b0437fc75da50423612871101 (patch) | |
tree | 9e27f5f1298c431f091a7bb8c62e7a89a7cbf312 /hw/s390x/virtio-ccw.h | |
parent | s390x/css: use define for "virtual-css-bridge" literal (diff) | |
download | qemu-dd70bd0d4cf2e10b0437fc75da50423612871101.tar.gz qemu-dd70bd0d4cf2e10b0437fc75da50423612871101.tar.xz qemu-dd70bd0d4cf2e10b0437fc75da50423612871101.zip |
s390x/css: Factor out virtual css bridge and bus
Currently, common base layers virtual css bridge and bus are
defined in hw/s390x/virtio-ccw.c(h). In order to support
multiple types of devices in the virtual channel subsystem,
especially non virtio-ccw, refactoring work needs to be done.
This work is just a pure code move without any functional change
except dropping an empty function virtual_css_bridge_init() and
virtio_ccw_busdev_unplug() changing. virtio_ccw_busdev_unplug()
is specific to virtio-ccw but gets referenced from the common
virtual css bridge code. To keep the functional changes to a
minimum we export this function from virtio-ccw.c and continue
to reference it inside virtual_css_bridge_class_init()
(now living in hw/s390x/css-bridge.c). A follow-up patch will
clean this up.
Signed-off-by: Jing Liu <liujbjl@linux.vnet.ibm.com>
Reviewed-by: Sascha Silbe <silbe@linux.vnet.ibm.com>
Reviewed-by: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'hw/s390x/virtio-ccw.h')
-rw-r--r-- | hw/s390x/virtio-ccw.h | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/hw/s390x/virtio-ccw.h b/hw/s390x/virtio-ccw.h index 6144625416..11023aabb7 100644 --- a/hw/s390x/virtio-ccw.h +++ b/hw/s390x/virtio-ccw.h @@ -101,17 +101,8 @@ static inline int virtio_ccw_rev_max(VirtioCcwDevice *dev) return dev->max_rev; } -/* virtual css bridge type */ -#define TYPE_VIRTUAL_CSS_BRIDGE "virtual-css-bridge" - -/* virtual css bus type */ -typedef struct VirtualCssBus { - BusState parent_obj; -} VirtualCssBus; - -#define TYPE_VIRTUAL_CSS_BUS "virtual-css-bus" -#define VIRTUAL_CSS_BUS(obj) \ - OBJECT_CHECK(VirtualCssBus, (obj), TYPE_VIRTUAL_CSS_BUS) +void virtio_ccw_busdev_unplug(HotplugHandler *hotplug_dev, + DeviceState *dev, Error **errp); /* virtio-scsi-ccw */ @@ -192,7 +183,6 @@ typedef struct VirtIORNGCcw { VirtIORNG vdev; } VirtIORNGCcw; -VirtualCssBus *virtual_css_bus_init(void); void virtio_ccw_device_update_status(SubchDev *sch); VirtIODevice *virtio_ccw_get_vdev(SubchDev *sch); |