[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 01/26] pci: replace the magic, 256, for the maximum
From: |
Isaku Yamahata |
Subject: |
[Qemu-devel] [PATCH 01/26] pci: replace the magic, 256, for the maximum of slot |
Date: |
Wed, 16 Mar 2011 18:29:12 +0900 |
Introduce symbol PCI_SLOT_MAX for the maximum of slot.
and replace the magic, 256.
Cc: Michael S. Tsirkin <address@hidden>
Signed-off-by: Isaku Yamahata <address@hidden>
---
hw/pci.h | 1 +
hw/pci_internals.h | 2 +-
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/hw/pci.h b/hw/pci.h
index 113e556..7d56337 100644
--- a/hw/pci.h
+++ b/hw/pci.h
@@ -16,6 +16,7 @@
#define PCI_DEVFN(slot, func) ((((slot) & 0x1f) << 3) | ((func) & 0x07))
#define PCI_SLOT(devfn) (((devfn) >> 3) & 0x1f)
#define PCI_FUNC(devfn) ((devfn) & 0x07)
+#define PCI_SLOT_MAX 32
#define PCI_FUNC_MAX 8
/* Class, Vendor and Device IDs from Linux's pci_ids.h */
diff --git a/hw/pci_internals.h b/hw/pci_internals.h
index e3c93a3..efaefcd 100644
--- a/hw/pci_internals.h
+++ b/hw/pci_internals.h
@@ -22,7 +22,7 @@ struct PCIBus {
pci_hotplug_fn hotplug;
DeviceState *hotplug_qdev;
void *irq_opaque;
- PCIDevice *devices[256];
+ PCIDevice *devices[PCI_SLOT_MAX * PCI_FUNC_MAX];
PCIDevice *parent_dev;
target_phys_addr_t mem_base;
--
1.7.1.1
- [Qemu-devel] [PATCH 00/26] q35 chipset support for native pci express support, Isaku Yamahata, 2011/03/16
- [Qemu-devel] [PATCH 10/26] ide/ahci/ich: use qdev.reset, Isaku Yamahata, 2011/03/16
- [Qemu-devel] [PATCH 06/26] pci_bridge: add helper function to convert PCIBridge into PCIDevice, Isaku Yamahata, 2011/03/16
- [Qemu-devel] [PATCH 25/26] pci_ids: add intel 82801BA pci-to-pci bridge id and PCI_CLASS_SERIAL_SMBUS, Isaku Yamahata, 2011/03/16
- [Qemu-devel] [PATCH 13/26] usb/uhci: add ich9 usb uhci id's device, Isaku Yamahata, 2011/03/16
- [Qemu-devel] [PATCH 01/26] pci: replace the magic, 256, for the maximum of slot,
Isaku Yamahata <=
- [Qemu-devel] [PATCH 17/26] pc, pc_piix: split out pc nic initialization, Isaku Yamahata, 2011/03/16
- [Qemu-devel] [PATCH 16/26] pc, pc_piix: split out allocating isa irqs, Isaku Yamahata, 2011/03/16
- [Qemu-devel] [PATCH 14/26] ide: consolidate drive_get(IF_IDE), Isaku Yamahata, 2011/03/16
- [Qemu-devel] [PATCH 11/26] ahci: add ide device initialization helper, Isaku Yamahata, 2011/03/16
- [Qemu-devel] [PATCH 18/26] ioapic: move ioapic_init() from pc_piix.c to pc.c, Isaku Yamahata, 2011/03/16
- [Qemu-devel] [PATCH 02/26] pci: add opaque argument to pci_map_irq_fn, Isaku Yamahata, 2011/03/16
- [Qemu-devel] [PATCH 03/26] pci: introduce pci_swizzle_map_irq_fn() for standardized interrupt pin swizzle, Isaku Yamahata, 2011/03/16