diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-05 15:39:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-05 15:39:10 -0400 |
commit | 108c1961847df2a875047c0fd27b419cb817d213 (patch) | |
tree | 5138948168df7043b1d39a1dbeb4a472f1cd66da /arch | |
parent | 48fc8de9cd093b8c9e2cfa339421862bae3a6cad (diff) | |
parent | 0df18ff366853cdf31e5238764ec5c63e6b5a398 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
x86 PCI: call dmi_check_pciprobe()
x86/pci: add pci=skip_isa_align command lines.
x86/pci: remove flag in pci_cfg_space_size_ext
x86: fix section mismatch in pci_scan_bus
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/pci/acpi.c | 41 | ||||
-rw-r--r-- | arch/x86/pci/common.c | 58 | ||||
-rw-r--r-- | arch/x86/pci/fixup.c | 2 | ||||
-rw-r--r-- | arch/x86/pci/init.c | 4 | ||||
-rw-r--r-- | arch/x86/pci/pci.h | 3 |
5 files changed, 62 insertions, 46 deletions
diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c index 1a9c0c6a1a18..d95de2f199cd 100644 --- a/arch/x86/pci/acpi.c +++ b/arch/x86/pci/acpi.c | |||
@@ -6,45 +6,6 @@ | |||
6 | #include <asm/numa.h> | 6 | #include <asm/numa.h> |
7 | #include "pci.h" | 7 | #include "pci.h" |
8 | 8 | ||
9 | static int __devinit can_skip_ioresource_align(const struct dmi_system_id *d) | ||
10 | { | ||
11 | pci_probe |= PCI_CAN_SKIP_ISA_ALIGN; | ||
12 | printk(KERN_INFO "PCI: %s detected, can skip ISA alignment\n", d->ident); | ||
13 | return 0; | ||
14 | } | ||
15 | |||
16 | static struct dmi_system_id acpi_pciprobe_dmi_table[] __devinitdata = { | ||
17 | /* | ||
18 | * Systems where PCI IO resource ISA alignment can be skipped | ||
19 | * when the ISA enable bit in the bridge control is not set | ||
20 | */ | ||
21 | { | ||
22 | .callback = can_skip_ioresource_align, | ||
23 | .ident = "IBM System x3800", | ||
24 | .matches = { | ||
25 | DMI_MATCH(DMI_SYS_VENDOR, "IBM"), | ||
26 | DMI_MATCH(DMI_PRODUCT_NAME, "x3800"), | ||
27 | }, | ||
28 | }, | ||
29 | { | ||
30 | .callback = can_skip_ioresource_align, | ||
31 | .ident = "IBM System x3850", | ||
32 | .matches = { | ||
33 | DMI_MATCH(DMI_SYS_VENDOR, "IBM"), | ||
34 | DMI_MATCH(DMI_PRODUCT_NAME, "x3850"), | ||
35 | }, | ||
36 | }, | ||
37 | { | ||
38 | .callback = can_skip_ioresource_align, | ||
39 | .ident = "IBM System x3950", | ||
40 | .matches = { | ||
41 | DMI_MATCH(DMI_SYS_VENDOR, "IBM"), | ||
42 | DMI_MATCH(DMI_PRODUCT_NAME, "x3950"), | ||
43 | }, | ||
44 | }, | ||
45 | {} | ||
46 | }; | ||
47 | |||
48 | struct pci_root_info { | 9 | struct pci_root_info { |
49 | char *name; | 10 | char *name; |
50 | unsigned int res_num; | 11 | unsigned int res_num; |
@@ -196,8 +157,6 @@ struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_device *device, int do | |||
196 | int pxm; | 157 | int pxm; |
197 | #endif | 158 | #endif |
198 | 159 | ||
199 | dmi_check_system(acpi_pciprobe_dmi_table); | ||
200 | |||
201 | if (domain && !pci_domains_supported) { | 160 | if (domain && !pci_domains_supported) { |
202 | printk(KERN_WARNING "PCI: Multiple domains not supported " | 161 | printk(KERN_WARNING "PCI: Multiple domains not supported " |
203 | "(dom %d, bus %d)\n", domain, busnum); | 162 | "(dom %d, bus %d)\n", domain, busnum); |
diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c index 2a4d751818b7..bfa72a9475b3 100644 --- a/arch/x86/pci/common.c +++ b/arch/x86/pci/common.c | |||
@@ -90,6 +90,50 @@ static void __devinit pcibios_fixup_device_resources(struct pci_dev *dev) | |||
90 | rom_r->start = rom_r->end = rom_r->flags = 0; | 90 | rom_r->start = rom_r->end = rom_r->flags = 0; |
91 | } | 91 | } |
92 | 92 | ||
93 | static int __devinit can_skip_ioresource_align(const struct dmi_system_id *d) | ||
94 | { | ||
95 | pci_probe |= PCI_CAN_SKIP_ISA_ALIGN; | ||
96 | printk(KERN_INFO "PCI: %s detected, can skip ISA alignment\n", d->ident); | ||
97 | return 0; | ||
98 | } | ||
99 | |||
100 | static struct dmi_system_id can_skip_pciprobe_dmi_table[] __devinitdata = { | ||
101 | /* | ||
102 | * Systems where PCI IO resource ISA alignment can be skipped | ||
103 | * when the ISA enable bit in the bridge control is not set | ||
104 | */ | ||
105 | { | ||
106 | .callback = can_skip_ioresource_align, | ||
107 | .ident = "IBM System x3800", | ||
108 | .matches = { | ||
109 | DMI_MATCH(DMI_SYS_VENDOR, "IBM"), | ||
110 | DMI_MATCH(DMI_PRODUCT_NAME, "x3800"), | ||
111 | }, | ||
112 | }, | ||
113 | { | ||
114 | .callback = can_skip_ioresource_align, | ||
115 | .ident = "IBM System x3850", | ||
116 | .matches = { | ||
117 | DMI_MATCH(DMI_SYS_VENDOR, "IBM"), | ||
118 | DMI_MATCH(DMI_PRODUCT_NAME, "x3850"), | ||
119 | }, | ||
120 | }, | ||
121 | { | ||
122 | .callback = can_skip_ioresource_align, | ||
123 | .ident = "IBM System x3950", | ||
124 | .matches = { | ||
125 | DMI_MATCH(DMI_SYS_VENDOR, "IBM"), | ||
126 | DMI_MATCH(DMI_PRODUCT_NAME, "x3950"), | ||
127 | }, | ||
128 | }, | ||
129 | {} | ||
130 | }; | ||
131 | |||
132 | void __init dmi_check_skip_isa_align(void) | ||
133 | { | ||
134 | dmi_check_system(can_skip_pciprobe_dmi_table); | ||
135 | } | ||
136 | |||
93 | /* | 137 | /* |
94 | * Called after each bus is probed, but before its children | 138 | * Called after each bus is probed, but before its children |
95 | * are examined. | 139 | * are examined. |
@@ -318,13 +362,16 @@ static struct dmi_system_id __devinitdata pciprobe_dmi_table[] = { | |||
318 | {} | 362 | {} |
319 | }; | 363 | }; |
320 | 364 | ||
365 | void __init dmi_check_pciprobe(void) | ||
366 | { | ||
367 | dmi_check_system(pciprobe_dmi_table); | ||
368 | } | ||
369 | |||
321 | struct pci_bus * __devinit pcibios_scan_root(int busnum) | 370 | struct pci_bus * __devinit pcibios_scan_root(int busnum) |
322 | { | 371 | { |
323 | struct pci_bus *bus = NULL; | 372 | struct pci_bus *bus = NULL; |
324 | struct pci_sysdata *sd; | 373 | struct pci_sysdata *sd; |
325 | 374 | ||
326 | dmi_check_system(pciprobe_dmi_table); | ||
327 | |||
328 | while ((bus = pci_find_next_bus(bus)) != NULL) { | 375 | while ((bus = pci_find_next_bus(bus)) != NULL) { |
329 | if (bus->number == busnum) { | 376 | if (bus->number == busnum) { |
330 | /* Already scanned */ | 377 | /* Already scanned */ |
@@ -462,6 +509,9 @@ char * __devinit pcibios_setup(char *str) | |||
462 | } else if (!strcmp(str, "routeirq")) { | 509 | } else if (!strcmp(str, "routeirq")) { |
463 | pci_routeirq = 1; | 510 | pci_routeirq = 1; |
464 | return NULL; | 511 | return NULL; |
512 | } else if (!strcmp(str, "skip_isa_align")) { | ||
513 | pci_probe |= PCI_CAN_SKIP_ISA_ALIGN; | ||
514 | return NULL; | ||
465 | } | 515 | } |
466 | return str; | 516 | return str; |
467 | } | 517 | } |
@@ -489,7 +539,7 @@ void pcibios_disable_device (struct pci_dev *dev) | |||
489 | pcibios_disable_irq(dev); | 539 | pcibios_disable_irq(dev); |
490 | } | 540 | } |
491 | 541 | ||
492 | struct pci_bus *pci_scan_bus_on_node(int busno, struct pci_ops *ops, int node) | 542 | struct pci_bus * __devinit pci_scan_bus_on_node(int busno, struct pci_ops *ops, int node) |
493 | { | 543 | { |
494 | struct pci_bus *bus = NULL; | 544 | struct pci_bus *bus = NULL; |
495 | struct pci_sysdata *sd; | 545 | struct pci_sysdata *sd; |
@@ -512,7 +562,7 @@ struct pci_bus *pci_scan_bus_on_node(int busno, struct pci_ops *ops, int node) | |||
512 | return bus; | 562 | return bus; |
513 | } | 563 | } |
514 | 564 | ||
515 | struct pci_bus *pci_scan_bus_with_sysdata(int busno) | 565 | struct pci_bus * __devinit pci_scan_bus_with_sysdata(int busno) |
516 | { | 566 | { |
517 | return pci_scan_bus_on_node(busno, &pci_root_ops, -1); | 567 | return pci_scan_bus_on_node(busno, &pci_root_ops, -1); |
518 | } | 568 | } |
diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c index b60b2abd480c..ff3a6a336342 100644 --- a/arch/x86/pci/fixup.c +++ b/arch/x86/pci/fixup.c | |||
@@ -502,7 +502,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SIEMENS, 0x0015, | |||
502 | */ | 502 | */ |
503 | static void fam10h_pci_cfg_space_size(struct pci_dev *dev) | 503 | static void fam10h_pci_cfg_space_size(struct pci_dev *dev) |
504 | { | 504 | { |
505 | dev->cfg_size = pci_cfg_space_size_ext(dev, 0); | 505 | dev->cfg_size = pci_cfg_space_size_ext(dev); |
506 | } | 506 | } |
507 | 507 | ||
508 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1200, fam10h_pci_cfg_space_size); | 508 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1200, fam10h_pci_cfg_space_size); |
diff --git a/arch/x86/pci/init.c b/arch/x86/pci/init.c index dd30c6076b5d..e70b9c57b88e 100644 --- a/arch/x86/pci/init.c +++ b/arch/x86/pci/init.c | |||
@@ -33,6 +33,10 @@ static __init int pci_access_init(void) | |||
33 | printk(KERN_ERR | 33 | printk(KERN_ERR |
34 | "PCI: Fatal: No config space access function found\n"); | 34 | "PCI: Fatal: No config space access function found\n"); |
35 | 35 | ||
36 | dmi_check_pciprobe(); | ||
37 | |||
38 | dmi_check_skip_isa_align(); | ||
39 | |||
36 | return 0; | 40 | return 0; |
37 | } | 41 | } |
38 | arch_initcall(pci_access_init); | 42 | arch_initcall(pci_access_init); |
diff --git a/arch/x86/pci/pci.h b/arch/x86/pci/pci.h index c58805a92db5..f3972b12c60a 100644 --- a/arch/x86/pci/pci.h +++ b/arch/x86/pci/pci.h | |||
@@ -38,6 +38,9 @@ enum pci_bf_sort_state { | |||
38 | pci_dmi_bf, | 38 | pci_dmi_bf, |
39 | }; | 39 | }; |
40 | 40 | ||
41 | extern void __init dmi_check_pciprobe(void); | ||
42 | extern void __init dmi_check_skip_isa_align(void); | ||
43 | |||
41 | /* pci-i386.c */ | 44 | /* pci-i386.c */ |
42 | 45 | ||
43 | extern unsigned int pcibios_max_latency; | 46 | extern unsigned int pcibios_max_latency; |