summaryrefslogtreecommitdiff
path: root/hw/s390x
diff options
context:
space:
mode:
authorFei Li <sherrylf@linux.vnet.ibm.com>2016-11-25 07:45:14 +0100
committerCornelia Huck <cornelia.huck@de.ibm.com>2017-04-21 09:32:09 +0200
commit5b00bef270e8bca9c1906cbc2a49eb376505db34 (patch)
tree3fbdae52a314c202bd06dbae900941888f77bcef /hw/s390x
parent2a78ac660f460edd60eb514c589c512c0f491c46 (diff)
downloadqemu-5b00bef270e8bca9c1906cbc2a49eb376505db34.zip
s390x: use enum for adapter type and standardize its naming
Let's use an enum for io adapter type, and standardize its naming to CSS_IO_ADAPTER_* by changing S390_PCIPT_ADAPTER to CSS_IO_ADAPTER_PCI. Signed-off-by: Fei Li <sherrylf@linux.vnet.ibm.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'hw/s390x')
-rw-r--r--hw/s390x/css.c2
-rw-r--r--hw/s390x/s390-pci-bus.h1
-rw-r--r--hw/s390x/s390-pci-inst.c2
3 files changed, 2 insertions, 3 deletions
diff --git a/hw/s390x/css.c b/hw/s390x/css.c
index f966ce2d15..1b242c1fb7 100644
--- a/hw/s390x/css.c
+++ b/hw/s390x/css.c
@@ -155,7 +155,7 @@ int css_create_css_image(uint8_t cssid, bool default_image)
return 0;
}
-int css_register_io_adapter(uint8_t type, uint8_t isc, bool swap,
+int css_register_io_adapter(CssIoAdapterType type, uint8_t isc, bool swap,
bool maskable, uint32_t *id)
{
IoAdapter *adapter;
diff --git a/hw/s390x/s390-pci-bus.h b/hw/s390x/s390-pci-bus.h
index dcbf4820c9..cf142a3e68 100644
--- a/hw/s390x/s390-pci-bus.h
+++ b/hw/s390x/s390-pci-bus.h
@@ -30,7 +30,6 @@
#define FH_MASK_INDEX 0x0000ffff
#define FH_SHM_VFIO 0x00010000
#define FH_SHM_EMUL 0x00020000
-#define S390_PCIPT_ADAPTER 2
#define ZPCI_MAX_FID 0xffffffff
#define ZPCI_MAX_UID 0xffff
#define UID_UNDEFINED 0
diff --git a/hw/s390x/s390-pci-inst.c b/hw/s390x/s390-pci-inst.c
index f520ce105f..93980d6b1f 100644
--- a/hw/s390x/s390-pci-inst.c
+++ b/hw/s390x/s390-pci-inst.c
@@ -734,7 +734,7 @@ static int reg_irqs(CPUS390XState *env, S390PCIBusDevice *pbdev, ZpciFib fib)
{
int ret, len;
- ret = css_register_io_adapter(S390_PCIPT_ADAPTER,
+ ret = css_register_io_adapter(CSS_IO_ADAPTER_PCI,
FIB_DATA_ISC(ldl_p(&fib.data)), true, false,
&pbdev->routes.adapter.adapter_id);
assert(ret == 0);