[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH V6 22/32] pci_host: change the signature of pci_data
From: |
Isaku Yamahata |
Subject: |
[Qemu-devel] [PATCH V6 22/32] pci_host: change the signature of pci_data_{read, write}. |
Date: |
Fri, 30 Oct 2009 21:21:16 +0900 |
change the first argument, void *opaque to PCIBus *s
of the pci_data_{read, write}.
They aren't used as direct callback so the argument type
don't have to be void*. So change it to the right type.
Signed-off-by: Isaku Yamahata <address@hidden>
Acked-by: Michael S. Tsirkin <address@hidden>
---
hw/pci.h | 4 ++--
hw/pci_host.c | 6 ++----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/hw/pci.h b/hw/pci.h
index b16f8f8..4f4266d 100644
--- a/hw/pci.h
+++ b/hw/pci.h
@@ -265,8 +265,8 @@ PCIDevice *pci_nic_init(NICInfo *nd, const char
*default_model,
const char *default_devaddr);
PCIDevice *pci_nic_init_nofail(NICInfo *nd, const char *default_model,
const char *default_devaddr);
-void pci_data_write(void *opaque, uint32_t addr, uint32_t val, int len);
-uint32_t pci_data_read(void *opaque, uint32_t addr, int len);
+void pci_data_write(PCIBus *s, uint32_t addr, uint32_t val, int len);
+uint32_t pci_data_read(PCIBus *s, uint32_t addr, int len);
int pci_bus_num(PCIBus *s);
void pci_for_each_device(PCIBus *bus, int bus_num, void (*fn)(PCIBus *bus,
PCIDevice *d));
PCIBus *pci_find_host_bus(int domain);
diff --git a/hw/pci_host.c b/hw/pci_host.c
index 351ade4..f4518dc 100644
--- a/hw/pci_host.c
+++ b/hw/pci_host.c
@@ -52,9 +52,8 @@ static inline uint32_t pci_addr_to_config(uint32_t addr)
return addr & (PCI_CONFIG_SPACE_SIZE - 1);
}
-void pci_data_write(void *opaque, uint32_t addr, uint32_t val, int len)
+void pci_data_write(PCIBus *s, uint32_t addr, uint32_t val, int len)
{
- PCIBus *s = opaque;
PCIDevice *pci_dev = pci_addr_to_dev(s, addr);
uint32_t config_addr = pci_addr_to_config(addr);
@@ -66,9 +65,8 @@ void pci_data_write(void *opaque, uint32_t addr, uint32_t
val, int len)
pci_dev->config_write(pci_dev, config_addr, val, len);
}
-uint32_t pci_data_read(void *opaque, uint32_t addr, int len)
+uint32_t pci_data_read(PCIBus *s, uint32_t addr, int len)
{
- PCIBus *s = opaque;
PCIDevice *pci_dev = pci_addr_to_dev(s, addr);
uint32_t config_addr = pci_addr_to_config(addr);
uint32_t val;
--
1.6.0.2
- [Qemu-devel] [PATCH V6 01/32] pci: fix PCI_DPRINTF() wrt variadic macro., (continued)
- [Qemu-devel] [PATCH V6 01/32] pci: fix PCI_DPRINTF() wrt variadic macro., Isaku Yamahata, 2009/10/30
- [Qemu-devel] [PATCH V6 18/32] pci: remove bus_num member from struct PCIBus., Isaku Yamahata, 2009/10/30
- [Qemu-devel] [PATCH V6 21/32] pci: move pci host stuff from pci.c to pci_host.c, Isaku Yamahata, 2009/10/30
- [Qemu-devel] [PATCH V6 27/32] pci: teach pci_default_config_write() ROM bar for normal/bridge device ., Isaku Yamahata, 2009/10/30
- [Qemu-devel] [PATCH V6 26/32] pci: use range helper functions., Isaku Yamahata, 2009/10/30
- [Qemu-devel] [PATCH V6 03/32] pci: use PCI_SLOT() and PCI_FUNC()., Isaku Yamahata, 2009/10/30
- [Qemu-devel] [PATCH V6 09/32] pci: s/PCI_ADDRESS_SPACE_/PCI_BASE_ADDRESS_SPACE_/ to match pci_regs.h, Isaku Yamahata, 2009/10/30
- [Qemu-devel] [PATCH V6 12/32] pci_host.h: move functions in pci_host.h into .c file., Isaku Yamahata, 2009/10/30
- [Qemu-devel] [PATCH V6 04/32] pci: define a constant to represent a unmapped bar and use it., Isaku Yamahata, 2009/10/30
- [Qemu-devel] [PATCH V6 29/32] pci: cosmetic on pci_upadte_mappings(), Isaku Yamahata, 2009/10/30
- [Qemu-devel] [PATCH V6 22/32] pci_host: change the signature of pci_data_{read, write}.,
Isaku Yamahata <=
- [Qemu-devel] [PATCH V6 13/32] pci_host: consolidate pci config address access., Isaku Yamahata, 2009/10/30
- [Qemu-devel] [PATCH V6 23/32] vmstate: introduce VMSTATE_BUFFER_UNSAFE_INFO., Isaku Yamahata, 2009/10/30
- [Qemu-devel] [PATCH V6 24/32] pci: pcie host and mmcfg support., Isaku Yamahata, 2009/10/30
- [Qemu-devel] [PATCH V6 07/32] pci/bridge: clean up of pci_bridge_initfn(), Isaku Yamahata, 2009/10/30
- [Qemu-devel] [PATCH V6 31/32] pci: implement pci bridge filtering., Isaku Yamahata, 2009/10/30
- [Qemu-devel] [PATCH V6 25/32] pci: add helper functions to check ranges overlap., Isaku Yamahata, 2009/10/30
- [Qemu-devel] [PATCH V6 08/32] pci: clean up pci_init_wmask(), Isaku Yamahata, 2009/10/30
- [Qemu-devel] [PATCH V6 28/32] pci: initialize pci config headers depending it pci header type., Isaku Yamahata, 2009/10/30
- [Qemu-devel] [PATCH V6 32/32] pci/monitor: print out bridge's filtering values and so on., Isaku Yamahata, 2009/10/30
- [Qemu-devel] [PATCH V6 20/32] pci: factor out the conversion logic from io port address into pci device., Isaku Yamahata, 2009/10/30