From 5b00bef270e8bca9c1906cbc2a49eb376505db34 Mon Sep 17 00:00:00 2001 From: Fei Li Date: Fri, 25 Nov 2016 07:45:14 +0100 Subject: 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 Reviewed-by: Cornelia Huck Signed-off-by: Cornelia Huck --- hw/s390x/css.c | 2 +- hw/s390x/s390-pci-bus.h | 1 - hw/s390x/s390-pci-inst.c | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) (limited to 'hw/s390x') diff --git a/hw/s390x/css.c b/hw/s390x/css.c index f966ce2..1b242c1 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 dcbf482..cf142a3 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 f520ce1..93980d6 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); -- cgit v1.1