summaryrefslogtreecommitdiff
path: root/hw/pci.c
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2011-08-08 16:09:32 +0300
committerAnthony Liguori <aliguori@us.ibm.com>2011-08-08 10:22:31 -0500
commit039523397fce67ccb15a9b71ef812f9a69286aa5 (patch)
tree8dca107d8672e38d1f297798af4b7c0ac48a498a /hw/pci.c
parente824b2cc3b4f6fbcbaa254abd8db55d2fbe8d19e (diff)
downloadqemu-039523397fce67ccb15a9b71ef812f9a69286aa5.tar.gz
qemu-039523397fce67ccb15a9b71ef812f9a69286aa5.tar.bz2
qemu-039523397fce67ccb15a9b71ef812f9a69286aa5.zip
pci: remove support for pre memory API BARs
Not used anymore. Reviewed-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/pci.c')
-rw-r--r--hw/pci.c33
1 files changed, 2 insertions, 31 deletions
diff --git a/hw/pci.c b/hw/pci.c
index 6547d2bcc2..dc7271a19f 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -848,18 +848,7 @@ static void pci_unregister_io_regions(PCIDevice *pci_dev)
r = &pci_dev->io_regions[i];
if (!r->size || r->addr == PCI_BAR_UNMAPPED)
continue;
- if (r->memory) {
- memory_region_del_subregion(r->address_space, r->memory);
- } else {
- if (r->type == PCI_BASE_ADDRESS_SPACE_IO) {
- isa_unassign_ioport(r->addr, r->filtered_size);
- } else {
- cpu_register_physical_memory(pci_to_cpu_addr(pci_dev->bus,
- r->addr),
- r->filtered_size,
- IO_MEM_UNASSIGNED);
- }
- }
+ memory_region_del_subregion(r->address_space, r->memory);
}
}
@@ -1058,25 +1047,7 @@ static void pci_update_mappings(PCIDevice *d)
/* now do the real mapping */
if (r->addr != PCI_BAR_UNMAPPED) {
- if (r->memory) {
- memory_region_del_subregion(r->address_space, r->memory);
- } else if (r->type & PCI_BASE_ADDRESS_SPACE_IO) {
- int class;
- /* NOTE: specific hack for IDE in PC case:
- only one byte must be mapped. */
- class = pci_get_word(d->config + PCI_CLASS_DEVICE);
- if (class == 0x0101 && r->size == 4) {
- isa_unassign_ioport(r->addr + 2, 1);
- } else {
- isa_unassign_ioport(r->addr, r->filtered_size);
- }
- } else {
- cpu_register_physical_memory(pci_to_cpu_addr(d->bus,
- r->addr),
- r->filtered_size,
- IO_MEM_UNASSIGNED);
- qemu_unregister_coalesced_mmio(r->addr, r->filtered_size);
- }
+ memory_region_del_subregion(r->address_space, r->memory);
}
r->addr = new_addr;
r->filtered_size = filtered_size;