From patchwork Mon Aug 23 05:46:48 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ken CC X-Patchwork-Id: 62446 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]) by ozlabs.org (Postfix) with ESMTP id 5EA60B70CB for ; Mon, 23 Aug 2010 15:58:17 +1000 (EST) Received: from localhost ([127.0.0.1]:37837 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OnPwP-0002Nb-H2 for incoming@patchwork.ozlabs.org; Mon, 23 Aug 2010 01:51:29 -0400 Received: from [140.186.70.92] (port=51224 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OnPs4-0001ZI-06 for qemu-devel@nongnu.org; Mon, 23 Aug 2010 01:47:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OnPs1-0002Hn-Pk for qemu-devel@nongnu.org; Mon, 23 Aug 2010 01:46:58 -0400 Received: from mail-qy0-f180.google.com ([209.85.216.180]:38971) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OnPs1-0002Hj-MU for qemu-devel@nongnu.org; Mon, 23 Aug 2010 01:46:57 -0400 Received: by qyk31 with SMTP id 31so4165450qyk.4 for ; Sun, 22 Aug 2010 22:46:56 -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:cc:subject :message-id:mime-version:content-type:content-disposition:user-agent; bh=goOWE5hLzWmO8ADIH24+oqrTgONWnhOahRzx9nkv1kc=; b=m0oonIwnidFD1dbmDsH9NX4c6oE58KAFRYivEx7tq4i5K+14iA0/LMbzNGW388hMEl //2DS0pAZSJsC5lpRNNI+926X4UNhneR3vfX/8mJ2EMX0TP26clzRfXVlt0BaNIwPN44 +ZdOgV0jdkVchCJdlhOt1JXolKKpSbnospg54= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=gbt3RBTZmzQCQTNI063QDSIfzloZVJZ138MRDiFLuOrJFlJiT5HH8wOPiLvN16eA3e BJeznuqsZY4riWVGEIkMYPhPaoiDk7+hhbtZxiMeB8yKVvH92NVJ0HEzEGTF7B60WHlk BzmgMVBFG/J8ztQtsno/6AQ21P4WMMXWhERR0= Received: by 10.224.114.155 with SMTP id e27mr2990404qaq.216.1282542416707; Sun, 22 Aug 2010 22:46:56 -0700 (PDT) Received: from localhost ([60.247.97.98]) by mx.google.com with ESMTPS id l13sm6473923qck.43.2010.08.22.22.46.53 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 22 Aug 2010 22:46:54 -0700 (PDT) Date: Mon, 23 Aug 2010 13:46:48 +0800 From: Ken CC To: kvm@vger.kernel.org, mtosatti@redhat.com Message-ID: <20100823053342.2537.19008.stgit@k1> 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) Cc: qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH 1/2] 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"