diff options
author | Eric Blake <eblake@redhat.com> | 2017-09-11 12:19:58 -0500 |
---|---|---|
committer | Thomas Huth <thuth@redhat.com> | 2018-02-14 11:43:41 +0100 |
commit | 9b67af76dbe62960794055a732f1e47680621192 (patch) | |
tree | c4e29d7b40462befc25f27006a1ad8c90ba8a406 /tests/libqos/pci-spapr.c | |
parent | 05e520f1c7f6ac7a142c616883e00c8924e81331 (diff) |
libqos: Use explicit QTestState for rtas operations
Drop one more client of global_qtest by teaching all rtas test
functionality to pass in an explicit QTestState, adjusting all
callers.
Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
[thuth: Use nicer indentation in rtas.h]
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests/libqos/pci-spapr.c')
-rw-r--r-- | tests/libqos/pci-spapr.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/tests/libqos/pci-spapr.c b/tests/libqos/pci-spapr.c index ef52fcbe2b..c0f7e6db9b 100644 --- a/tests/libqos/pci-spapr.c +++ b/tests/libqos/pci-spapr.c @@ -108,21 +108,24 @@ static uint8_t qpci_spapr_config_readb(QPCIBus *bus, int devfn, uint8_t offset) { QPCIBusSPAPR *s = container_of(bus, QPCIBusSPAPR, bus); uint32_t config_addr = (devfn << 8) | offset; - return qrtas_ibm_read_pci_config(s->alloc, s->buid, config_addr, 1); + return qrtas_ibm_read_pci_config(bus->qts, s->alloc, s->buid, + config_addr, 1); } static uint16_t qpci_spapr_config_readw(QPCIBus *bus, int devfn, uint8_t offset) { QPCIBusSPAPR *s = container_of(bus, QPCIBusSPAPR, bus); uint32_t config_addr = (devfn << 8) | offset; - return qrtas_ibm_read_pci_config(s->alloc, s->buid, config_addr, 2); + return qrtas_ibm_read_pci_config(bus->qts, s->alloc, s->buid, + config_addr, 2); } static uint32_t qpci_spapr_config_readl(QPCIBus *bus, int devfn, uint8_t offset) { QPCIBusSPAPR *s = container_of(bus, QPCIBusSPAPR, bus); uint32_t config_addr = (devfn << 8) | offset; - return qrtas_ibm_read_pci_config(s->alloc, s->buid, config_addr, 4); + return qrtas_ibm_read_pci_config(bus->qts, s->alloc, s->buid, + config_addr, 4); } static void qpci_spapr_config_writeb(QPCIBus *bus, int devfn, uint8_t offset, @@ -130,7 +133,8 @@ static void qpci_spapr_config_writeb(QPCIBus *bus, int devfn, uint8_t offset, { QPCIBusSPAPR *s = container_of(bus, QPCIBusSPAPR, bus); uint32_t config_addr = (devfn << 8) | offset; - qrtas_ibm_write_pci_config(s->alloc, s->buid, config_addr, 1, value); + qrtas_ibm_write_pci_config(bus->qts, s->alloc, s->buid, + config_addr, 1, value); } static void qpci_spapr_config_writew(QPCIBus *bus, int devfn, uint8_t offset, @@ -138,7 +142,8 @@ static void qpci_spapr_config_writew(QPCIBus *bus, int devfn, uint8_t offset, { QPCIBusSPAPR *s = container_of(bus, QPCIBusSPAPR, bus); uint32_t config_addr = (devfn << 8) | offset; - qrtas_ibm_write_pci_config(s->alloc, s->buid, config_addr, 2, value); + qrtas_ibm_write_pci_config(bus->qts, s->alloc, s->buid, + config_addr, 2, value); } static void qpci_spapr_config_writel(QPCIBus *bus, int devfn, uint8_t offset, @@ -146,7 +151,8 @@ static void qpci_spapr_config_writel(QPCIBus *bus, int devfn, uint8_t offset, { QPCIBusSPAPR *s = container_of(bus, QPCIBusSPAPR, bus); uint32_t config_addr = (devfn << 8) | offset; - qrtas_ibm_write_pci_config(s->alloc, s->buid, config_addr, 4, value); + qrtas_ibm_write_pci_config(bus->qts, s->alloc, s->buid, + config_addr, 4, value); } #define SPAPR_PCI_BASE (1ULL << 45) |