From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ken CC Subject: [PATCH 1/3] PCI: define max devices number on PCIBus as PCIBUS_MAX_DEVICES in pci.h Date: Tue, 24 Aug 2010 14:33:07 +0800 Message-ID: <20100824063307.GA10815@kt> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: yamahata@valinux.co.jp, qemu-devel@nongnu.org To: kvm@vger.kernel.org Return-path: Received: from mail-qy0-f181.google.com ([209.85.216.181]:46458 "EHLO mail-qy0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752975Ab0HXGdQ (ORCPT ); Tue, 24 Aug 2010 02:33:16 -0400 Received: by qyk33 with SMTP id 33so6146510qyk.19 for ; Mon, 23 Aug 2010 23:33:15 -0700 (PDT) Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: Signed-off-by: Ken CC --- hw/pci.c | 2 +- hw/pci.h | 1 + 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 70dbace..02019a1 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -47,7 +47,7 @@ struct PCIBus { pci_hotplug_fn hotplug; DeviceState *hotplug_qdev; void *irq_opaque; - PCIDevice *devices[256]; + PCIDevice *devices[PCIBUS_MAX_DEVICES]; PCIDevice *parent_dev; target_phys_addr_t mem_base; diff --git a/hw/pci.h b/hw/pci.h index ccb99d0..f90840c 100644 --- a/hw/pci.h +++ b/hw/pci.h @@ -100,6 +100,7 @@ typedef struct PCIIORegion { #define PCI_ROM_SLOT 6 #define PCI_NUM_REGIONS 7 +#define PCIBUS_MAX_DEVICES 256 #include "pci_regs.h"