[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 10/12] Calculate pci region stats on demand
From: |
Kevin O'Connor |
Subject: |
Re: [Qemu-devel] [PATCH 10/12] Calculate pci region stats on demand |
Date: |
Tue, 24 Apr 2012 21:14:25 -0400 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Tue, Apr 24, 2012 at 06:24:27PM +1200, Alexey Korolev wrote:
> Do not store pci region stats - instead calulate the
> sum and alignment on demand.
[...]
> @@ -446,9 +459,9 @@ static int pci_bios_check_devices(struct pci_bus *busses)
> for (type = 0; type < PCI_REGION_TYPE_COUNT; type++) {
> u64 align = (type == PCI_REGION_TYPE_IO) ?
> PCI_BRIDGE_IO_MIN : PCI_BRIDGE_MEM_MIN;
> - if (s->r[type].align > align)
> - align = s->r[type].align;
> - u64 size = ALIGN(s->r[type].sum, align);
> + if (pci_region_align(&s->r[type]) > align)
> + align = pci_region_align(&s->r[type]);
> + u64 size = ALIGN(pci_region_sum(&s->r[type]), align);
[...]
> + r_end->base = ALIGN_DOWN((BUILD_PCIMEM_END - pci_region_sum(r_end)),
> + pci_region_align(r_end));
> + r_start->base = ALIGN_DOWN((r_end->base - pci_region_sum(r_start)),
> + pci_region_align(r_start));
I'd avoid making function calls in the parameter of a macro (it can be
executed multiple times and it's non-obvious).
-Kevin
- [Qemu-devel] [PATCH 05/12] pciinit: Track region alignment explicitly., (continued)
- [Qemu-devel] [PATCH 05/12] pciinit: Track region alignment explicitly., Alexey Korolev, 2012/04/24
- [Qemu-devel] [PATCH 06/12] pciinit: bridges can have two regions too, Alexey Korolev, 2012/04/24
- [Qemu-devel] [PATCH 07/12] pciinit: Switch to 64bit variable types., Alexey Korolev, 2012/04/24
- [Qemu-devel] [PATCH 08/12] pciinit: Add pci_region structure., Alexey Korolev, 2012/04/24
- [Qemu-devel] [PATCH 09/12] pciinit: 64bit capability discovery for pci bridges, Alexey Korolev, 2012/04/24
- [Qemu-devel] [PATCH 10/12] Calculate pci region stats on demand, Alexey Korolev, 2012/04/24
- [Qemu-devel] [PATCH 10/12] Calculate pci region stats on demand, Alexey Korolev, 2012/04/24
- Re: [Qemu-devel] [PATCH 10/12] Calculate pci region stats on demand,
Kevin O'Connor <=
- [Qemu-devel] [PATCH 11/12] Migrate 64bit entries to 64bit pci regions, Alexey Korolev, 2012/04/24
- Re: [Qemu-devel] [PATCH 11/12] Migrate 64bit entries to 64bit pci regions, Kevin O'Connor, 2012/04/24
- Re: [Qemu-devel] [PATCH 11/12] Migrate 64bit entries to 64bit pci regions, Alexey Korolev, 2012/04/25
- Re: [Qemu-devel] [PATCH 11/12] Migrate 64bit entries to 64bit pci regions, Kevin O'Connor, 2012/04/25
- Re: [Qemu-devel] [SeaBIOS] [PATCH 11/12] Migrate 64bit entries to 64bit pci regions, Gerd Hoffmann, 2012/04/25
- Re: [Qemu-devel] [SeaBIOS] [PATCH 11/12] Migrate 64bit entries to 64bit pci regions, Alexey Korolev, 2012/04/26
- Re: [Qemu-devel] [SeaBIOS] [PATCH 11/12] Migrate 64bit entries to 64bit pci regions, Gerd Hoffmann, 2012/04/26
- Re: [Qemu-devel] [SeaBIOS] [PATCH 11/12] Migrate 64bit entries to 64bit pci regions, Kevin O'Connor, 2012/04/26
- Re: [Qemu-devel] [SeaBIOS] [PATCH 11/12] Migrate 64bit entries to 64bit pci regions, Kevin O'Connor, 2012/04/26
- Re: [Qemu-devel] [SeaBIOS] [PATCH 11/12] Migrate 64bit entries to 64bit pci regions, Alexey Korolev, 2012/04/29