qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 0/6] Redesign of pciinit.c (take 2)


From: Alexey Korolev
Subject: [Qemu-devel] [PATCH 0/6] Redesign of pciinit.c (take 2)
Date: Tue, 13 Mar 2012 17:39:16 +1300

Hi,

This patch series redesigns the existing pciinit.c code and introduces
linked list operations.
Changes are more about structures definitions rather than functionality.
There are no more arrays of bases and counts in new implementation. The
new implementation is based on dynamic allocation of pci_region_entry
structures. 
Each pci_region_entry structure could be a PCI bar or a downstream PCI
region (bridge). Each entry has a set of attributes: type (IO, MEM,
PREFMEM), is64bit, size, base address, PCI device owner, and a
pointer to the pci_bus it belongs to.
Also this series introduces list head operations which could be quite
handy not only for pciinit.c code but for post memory manager and thread
operations. 

The patch series includes 3 patches.

1. Introduce List operations
2. Add pci_region_entry and linked lists operations in place while still
using the array system to do the allocations. 
3. Switch to lists operations
4. Delete old code. (3 & 4 are split for better readability)
5. Get rid of size element from bus->r structure, now we use entry->size
for the same purpose
6. Make use of list operations in pmm.c and stack.c

 src/pciinit.c |  270 ++++++++++++++++++++++++++-------------------------------
 src/pmm.c     |   29 ++----
 src/stacks.c  |    8 +--
 src/util.h    |   32 +++++++
 4 files changed, 165 insertions(+), 174 deletions(-)


P/s
It is basically the same functionality as in previous version. I just
split commit in more pieces to make the changes to be as obvious as
possible.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]