From: Ken CC <ken.ccao@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] PCI: define max devices number on PCIBus as PCIBus_MAX_DEVICES in pci.h
Date: Thu, 12 Aug 2010 17:25:33 +0800 [thread overview]
Message-ID: <20100812092533.GA22091@kt> (raw)
Signed-off-by: Ken CC <ken.ccao@gmail.com>
---
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"
next reply other threads:[~2010-08-12 9:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-12 9:25 Ken CC [this message]
2010-08-12 10:00 ` [Qemu-devel] [PATCH 2/2] pci init: Check if devfn exceeding the max devices number supported on bus Ken CC
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100812092533.GA22091@kt \
--to=ken.ccao@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).