diff options
author | Jeff Garzik <jeff@garzik.org> | 2007-10-11 16:58:30 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-10-12 18:03:19 -0400 |
commit | a79e4198d1effbba040e9bf407a95fc9b3418789 (patch) | |
tree | bbfeed15db3a03c3e7f50ae36f18c017fb940b9e /include/asm-x86/pci_32.h | |
parent | 32a2eea795643929a43cbbba00d8c4a176b309bf (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_32.h')
-rw-r--r-- | include/asm-x86/pci_32.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/asm-x86/pci_32.h b/include/asm-x86/pci_32.h index 4fcacc711385..0d91605cd1e2 100644 --- a/include/asm-x86/pci_32.h +++ b/include/asm-x86/pci_32.h | |||
@@ -5,12 +5,24 @@ | |||
5 | #ifdef __KERNEL__ | 5 | #ifdef __KERNEL__ |
6 | 6 | ||
7 | struct pci_sysdata { | 7 | struct pci_sysdata { |
8 | int domain; /* PCI domain */ | ||
8 | int node; /* NUMA node */ | 9 | int node; /* NUMA node */ |
9 | }; | 10 | }; |
10 | 11 | ||
11 | /* scan a bus after allocating a pci_sysdata for it */ | 12 | /* scan a bus after allocating a pci_sysdata for it */ |
12 | extern struct pci_bus *pci_scan_bus_with_sysdata(int busno); | 13 | extern struct pci_bus *pci_scan_bus_with_sysdata(int busno); |
13 | 14 | ||
15 | static inline int pci_domain_nr(struct pci_bus *bus) | ||
16 | { | ||
17 | struct pci_sysdata *sd = bus->sysdata; | ||
18 | return sd->domain; | ||
19 | } | ||
20 | |||
21 | static inline int pci_proc_domain(struct pci_bus *bus) | ||
22 | { | ||
23 | return pci_domain_nr(bus); | ||
24 | } | ||
25 | |||
14 | #include <linux/mm.h> /* for struct page */ | 26 | #include <linux/mm.h> /* for struct page */ |
15 | 27 | ||
16 | /* Can be used to override the logic in pci_scan_bus for skipping | 28 | /* Can be used to override the logic in pci_scan_bus for skipping |