aboutsummaryrefslogtreecommitdiff
path: root/hw/pci.h
diff options
context:
space:
mode:
authorIsaku Yamahata <yamahata@valinux.co.jp>2011-01-27 15:56:35 +0900
committerMichael S. Tsirkin <mst@redhat.com>2011-03-28 18:34:22 +0200
commit90a20dbb2837f5ff05a9b19659ba1aa218cbd2de (patch)
tree35fafbfb2cfa89d26c54b3c0ca9c26cbc96005e9 /hw/pci.h
parentf64622c401d4975a56b8559e16286231a1d2cfb8 (diff)
pci: replace the magic, 256, for the maximum of devfn
Introduce symbol PCI_SLOT_MAX for the # of slots, and replace the magic, 256. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/pci.h')
-rw-r--r--hw/pci.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/pci.h b/hw/pci.h
index 113e556e2d..7d56337c2b 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 */