From patchwork Thu Aug 12 09:25:33 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ken CC X-Patchwork-Id: 61548 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 620E7B70DF for ; Thu, 12 Aug 2010 19:29:54 +1000 (EST) Received: from localhost ([127.0.0.1]:49731 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OjU6h-0002Fk-C9 for incoming@patchwork.ozlabs.org; Thu, 12 Aug 2010 05:29:51 -0400 Received: from [140.186.70.92] (port=57942 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OjU2d-0000aY-VO for qemu-devel@nongnu.org; Thu, 12 Aug 2010 05:25:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OjU2c-00020o-SV for qemu-devel@nongnu.org; Thu, 12 Aug 2010 05:25:39 -0400 Received: from mail-pw0-f45.google.com ([209.85.160.45]:65159) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OjU2c-00020Z-NS for qemu-devel@nongnu.org; Thu, 12 Aug 2010 05:25:38 -0400 Received: by pwi2 with SMTP id 2so359288pwi.4 for ; Thu, 12 Aug 2010 02:25:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:mime-version:content-type:content-disposition:user-agent; bh=vezztGWFKrfO455nyEPXzEnOYguvF3gVDQ20Vcywjx4=; b=Bx5Qr3B6GsK6r2An/s+17GEdShZUYbdFd9dPXDqdPFedVFU2gjQs8Aw3P8V+jx9lfP ki6jd2U9kviQ/XzXfQ7+9PZ5YP9OWbddXr9dEqLGHoI2DpuIXjQUtKzilMEg1vE8gZer Svn2XMOU+JI4NCYQxpILAdJS3gdjImixiATJE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=sOvWqopvh0eU4RDQZ4SbNMPsv017UKJRyXevX8jeDy+w2w6/Q5YMbPZEqzETIOlInN 69dzv6LOtg/RmZJ3LsL922h7ERm56zbBsYTuIfGYd/IkYuAQAafchtqGaQd4cFVCaYD8 cJwbUbXLUZGXu1fXoDO7sEK/7FoAvSLe8ddTs= Received: by 10.142.48.18 with SMTP id v18mr17120408wfv.101.1281605136848; Thu, 12 Aug 2010 02:25:36 -0700 (PDT) Received: from localhost ([60.247.97.98]) by mx.google.com with ESMTPS id v38sm1304689wfh.12.2010.08.12.02.25.35 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 12 Aug 2010 02:25:36 -0700 (PDT) Date: Thu, 12 Aug 2010 17:25:33 +0800 From: Ken CC To: qemu-devel@nongnu.org Message-ID: <20100812092533.GA22091@kt> MIME-Version: 1.0 Content-Disposition: inline User-Agent: StGit/0.15-97-g9680 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: [Qemu-devel] [PATCH] PCI: define max devices number on PCIBus as PCIBus_MAX_DEVICES in pci.h X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 a98d6f3..a09fbac 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -44,7 +44,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 1eab7e7..5f6c85b 100644 --- a/hw/pci.h +++ b/hw/pci.h @@ -92,6 +92,7 @@ typedef struct PCIIORegion { #define PCI_ROM_SLOT 6 #define PCI_NUM_REGIONS 7 +#define PCIBUS_MAX_DEVICES 256 #include "pci_regs.h"