Received: from eggs.gnu.org ([208.118.235.92]:60977) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCkSy-0005Wq-3M for qemu-devel@nongnu.org; Wed, 28 Mar 2012 00:26:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SCkSw-0007eE-CA for qemu-devel@nongnu.org; Wed, 28 Mar 2012 00:26:35 -0400 Received: from usrksweb02.endace.com ([174.143.168.194]:35841) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCkSw-0007dH-5m for qemu-devel@nongnu.org; Wed, 28 Mar 2012 00:26:34 -0400 Message-ID: <1332908730.10322.4.camel@nzhmlwks0057.ad.endace.com> From: Alexey Korolev Date: Wed, 28 Mar 2012 17:25:30 +1300 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Subject: [Qemu-devel] [PATCH 0/4] Redesign of pciinit.c (take 3) Reply-To: alexey.korolev@endace.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: kevin@koconnor.net, seabios@seabios.org Cc: sfd@endace.com, qemu-devel@nongnu.org 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. 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. Get rid of size element from bus->r structure, now we use entry->size for the same purpose src/pci.h | 5 - src/pciinit.c | 258 ++++++++++++++++++++++++++------------------------------- src/util.h | 21 +++++ 3 files changed, 137 insertions(+), 147 deletions(-)