Signed-off-by: Blue Swirl <blauwir...@gmail.com> --- hw/pci.c | 14 +------------- hw/pci.h | 2 -- 2 files changed, 1 insertions(+), 15 deletions(-)
diff --git a/hw/pci.c b/hw/pci.c index 57ff7b1..af74003 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -312,11 +312,6 @@ void pci_bus_hotplug(PCIBus *bus, pci_hotplug_fn hotplug, DeviceState *qdev) bus->hotplug_qdev = qdev; } -void pci_bus_set_mem_base(PCIBus *bus, target_phys_addr_t base) -{ - bus->mem_base = base; -} - PCIBus *pci_register_bus(DeviceState *parent, const char *name, pci_set_irq_fn set_irq, pci_map_irq_fn map_irq, void *irq_opaque, @@ -833,12 +828,6 @@ PCIDevice *pci_register_device(PCIBus *bus, const char *name, return pci_dev; } -static target_phys_addr_t pci_to_cpu_addr(PCIBus *bus, - target_phys_addr_t addr) -{ - return addr + bus->mem_base; -} - static void pci_unregister_io_regions(PCIDevice *pci_dev) { PCIIORegion *r; @@ -1066,8 +1055,7 @@ static void pci_update_mappings(PCIDevice *d) 1); } else { memory_region_add_subregion_overlap(r->address_space, - pci_to_cpu_addr(d->bus, - r->addr), + r->addr, r->memory, 1); } diff --git a/hw/pci.h b/hw/pci.h index 391217e..c04b169 100644 --- a/hw/pci.h +++ b/hw/pci.h @@ -255,8 +255,6 @@ PCIBus *pci_register_bus(DeviceState *parent, const char *name, void pci_device_reset(PCIDevice *dev); void pci_bus_reset(PCIBus *bus); -void pci_bus_set_mem_base(PCIBus *bus, target_phys_addr_t base); - 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, -- 1.6.2.4
From a2a3612044738ab3ba69c20057308d5e707efe71 Mon Sep 17 00:00:00 2001 Message-Id: <a2a3612044738ab3ba69c20057308d5e707efe71.1315084536.git.blauwir...@gmail.com> In-Reply-To: <88d72b5a06081d44c03a30c3495bbc49e5ba8d9d.1315084536.git.blauwir...@gmail.com> References: <88d72b5a06081d44c03a30c3495bbc49e5ba8d9d.1315084536.git.blauwir...@gmail.com> From: Blue Swirl <blauwir...@gmail.com> Date: Sat, 3 Sep 2011 16:41:21 +0000 Subject: [PATCH 2/2] PCI: delete unused mem_base and pci_to_cpu_addr Signed-off-by: Blue Swirl <blauwir...@gmail.com> --- hw/pci.c | 14 +------------- hw/pci.h | 2 -- 2 files changed, 1 insertions(+), 15 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 57ff7b1..af74003 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -312,11 +312,6 @@ void pci_bus_hotplug(PCIBus *bus, pci_hotplug_fn hotplug, DeviceState *qdev) bus->hotplug_qdev = qdev; } -void pci_bus_set_mem_base(PCIBus *bus, target_phys_addr_t base) -{ - bus->mem_base = base; -} - PCIBus *pci_register_bus(DeviceState *parent, const char *name, pci_set_irq_fn set_irq, pci_map_irq_fn map_irq, void *irq_opaque, @@ -833,12 +828,6 @@ PCIDevice *pci_register_device(PCIBus *bus, const char *name, return pci_dev; } -static target_phys_addr_t pci_to_cpu_addr(PCIBus *bus, - target_phys_addr_t addr) -{ - return addr + bus->mem_base; -} - static void pci_unregister_io_regions(PCIDevice *pci_dev) { PCIIORegion *r; @@ -1066,8 +1055,7 @@ static void pci_update_mappings(PCIDevice *d) 1); } else { memory_region_add_subregion_overlap(r->address_space, - pci_to_cpu_addr(d->bus, - r->addr), + r->addr, r->memory, 1); } diff --git a/hw/pci.h b/hw/pci.h index 391217e..c04b169 100644 --- a/hw/pci.h +++ b/hw/pci.h @@ -255,8 +255,6 @@ PCIBus *pci_register_bus(DeviceState *parent, const char *name, void pci_device_reset(PCIDevice *dev); void pci_bus_reset(PCIBus *bus); -void pci_bus_set_mem_base(PCIBus *bus, target_phys_addr_t base); - 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, -- 1.7.2.5