* [Qemu-devel] [PATCH] pci: simplify memory region registration
@ 2011-09-25 13:22 Avi Kivity
2011-09-25 13:30 ` Michael S. Tsirkin
0 siblings, 1 reply; 2+ messages in thread
From: Avi Kivity @ 2011-09-25 13:22 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: qemu-devel
The two code paths (for ADDRESS_SPACE_IO and ADDRESS_SPACE_MEM) are
identical. Unify them.
Signed-off-by: Avi Kivity <avi@redhat.com>
---
hw/pci.c | 13 ++-----------
1 files changed, 2 insertions(+), 11 deletions(-)
diff --git a/hw/pci.c b/hw/pci.c
index 749e8d8..e8cc1b0 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -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);
}
}
}
--
1.7.6.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] pci: simplify memory region registration
2011-09-25 13:22 [Qemu-devel] [PATCH] pci: simplify memory region registration Avi Kivity
@ 2011-09-25 13:30 ` Michael S. Tsirkin
0 siblings, 0 replies; 2+ messages in thread
From: Michael S. Tsirkin @ 2011-09-25 13:30 UTC (permalink / raw)
To: Avi Kivity; +Cc: qemu-devel
On Sun, Sep 25, 2011 at 04:22:57PM +0300, Avi Kivity wrote:
> The two code paths (for ADDRESS_SPACE_IO and ADDRESS_SPACE_MEM) are
> identical. Unify them.
>
> Signed-off-by: Avi Kivity <avi@redhat.com>
Applied, thanks
> ---
> hw/pci.c | 13 ++-----------
> 1 files changed, 2 insertions(+), 11 deletions(-)
>
> diff --git a/hw/pci.c b/hw/pci.c
> index 749e8d8..e8cc1b0 100644
> --- a/hw/pci.c
> +++ b/hw/pci.c
> @@ -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);
> }
> }
> }
> --
> 1.7.6.3
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-09-25 13:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-25 13:22 [Qemu-devel] [PATCH] pci: simplify memory region registration Avi Kivity
2011-09-25 13:30 ` Michael S. Tsirkin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).