mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
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>
This commit is contained in:
parent
3f9e485964
commit
dd70bd0d4c
6 changed files with 127 additions and 88 deletions
31
include/hw/s390x/css-bridge.h
Normal file
31
include/hw/s390x/css-bridge.h
Normal file
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* virtual css bridge definition
|
||||
*
|
||||
* Copyright 2012,2016 IBM Corp.
|
||||
* Author(s): Cornelia Huck <cornelia.huck@de.ibm.com>
|
||||
* Pierre Morel <pmorel@linux.vnet.ibm.com>
|
||||
*
|
||||
* This work is licensed under the terms of the GNU GPL, version 2 or (at
|
||||
* your option) any later version. See the COPYING file in the top-level
|
||||
* directory.
|
||||
*/
|
||||
|
||||
#ifndef HW_S390X_CSS_BRIDGE_H
|
||||
#define HW_S390X_CSS_BRIDGE_H
|
||||
#include "qom/object.h"
|
||||
#include "hw/qdev-core.h"
|
||||
|
||||
/* virtual css bridge */
|
||||
#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)
|
||||
VirtualCssBus *virtual_css_bus_init(void);
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue