diff options
author | Avi Kivity <avi@redhat.com> | 2011-08-11 14:40:58 +0300 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-10-17 15:59:17 +0200 |
commit | 8b881e776a45cc1ee18f4bc8182bbc1d2aed56e8 (patch) | |
tree | 4c3ebd127478145ddd767e8a5e1f8f19c555391e /hw | |
parent | adfc39eaeff3da25376f7d735ac97ee25f933dcc (diff) |
pci: simplify memory region registration
The two code paths (for ADDRESS_SPACE_IO and ADDRESS_SPACE_MEM) are
identical. Unify them.
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/pci.c | 13 |
1 files changed, 2 insertions, 11 deletions
@@ -998,17 +998,8 @@ static void pci_update_mappings(PCIDevice *d) } r->addr = new_addr; if (r->addr != PCI_BAR_UNMAPPED) { - if (r->type & PCI_BASE_ADDRESS_SPACE_IO) { - memory_region_add_subregion_overlap(r->address_space, - r->addr, - r->memory, - 1); - } else { - memory_region_add_subregion_overlap(r->address_space, - r->addr, - r->memory, - 1); - } + memory_region_add_subregion_overlap(r->address_space, + r->addr, r->memory, 1); } } } |