summaryrefslogtreecommitdiff
path: root/include/asm-x86/pci_64.h
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2007-10-11 16:58:30 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-10-12 15:03:19 -0700
commita79e4198d1effbba040e9bf407a95fc9b3418789 (patch)
treebbfeed15db3a03c3e7f50ae36f18c017fb940b9e /include/asm-x86/pci_64.h
parent32a2eea795643929a43cbbba00d8c4a176b309bf (diff)
PCI: X86: Introduce and enable PCI domain support
* fix bug in pci_read() and pci_write() which prevented PCI domain support from working (hardcoded domain 0). * unconditionally enable CONFIG_PCI_DOMAINS * implement pci_domain_nr() and pci_proc_domain(), as required of all arches when CONFIG_PCI_DOMAINS is enabled. * store domain in struct pci_sysdata, as assigned by ACPI * support "pci=nodomains" Signed-off-by: Jeff Garzik <jgarzik@redhat.com> Cc: Andi Kleen <ak@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/asm-x86/pci_64.h')
-rw-r--r--include/asm-x86/pci_64.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/asm-x86/pci_64.h b/include/asm-x86/pci_64.h
index 5da8cb0c0599..0a123d6a820f 100644
--- a/include/asm-x86/pci_64.h
+++ b/include/asm-x86/pci_64.h
@@ -6,12 +6,24 @@
#ifdef __KERNEL__
struct pci_sysdata {
+ int domain; /* PCI domain */
int node; /* NUMA node */
void* iommu; /* IOMMU private data */
};
extern struct pci_bus *pci_scan_bus_with_sysdata(int busno);
+static inline int pci_domain_nr(struct pci_bus *bus)
+{
+ struct pci_sysdata *sd = bus->sysdata;
+ return sd->domain;
+}
+
+static inline int pci_proc_domain(struct pci_bus *bus)
+{
+ return pci_domain_nr(bus);
+}
+
#ifdef CONFIG_CALGARY_IOMMU
static inline void* pci_iommu(struct pci_bus *bus)
{