diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-07-18 13:31:12 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-18 13:31:12 -0400 |
commit | 3e370b29d35fb01bfb92c2814d6f79bf6a2cb970 (patch) | |
tree | 3b8fb467d60bfe6a34686f4abdc3a60050ba40a4 /arch/x86/pci/common.c | |
parent | 88d1dce3a74367291f65a757fbdcaf17f042f30c (diff) | |
parent | 5b664cb235e97afbf34db9c4d77f08ebd725335e (diff) |
Merge branch 'linus' into x86/pci-ioapic-boot-irq-quirks
Conflicts:
drivers/pci/quirks.c
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/pci/common.c')
-rw-r--r-- | arch/x86/pci/common.c | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c index 00a319cd5be3..1485a26ddcef 100644 --- a/arch/x86/pci/common.c +++ b/arch/x86/pci/common.c | |||
@@ -20,6 +20,7 @@ | |||
20 | unsigned int pci_probe = PCI_PROBE_BIOS | PCI_PROBE_CONF1 | PCI_PROBE_CONF2 | | 20 | unsigned int pci_probe = PCI_PROBE_BIOS | PCI_PROBE_CONF1 | PCI_PROBE_CONF2 | |
21 | PCI_PROBE_MMCONF; | 21 | PCI_PROBE_MMCONF; |
22 | 22 | ||
23 | unsigned int pci_early_dump_regs; | ||
23 | static int pci_bf_sort; | 24 | static int pci_bf_sort; |
24 | int pci_routeirq; | 25 | int pci_routeirq; |
25 | int noioapicquirk; | 26 | int noioapicquirk; |
@@ -33,7 +34,7 @@ struct pci_raw_ops *raw_pci_ext_ops; | |||
33 | int raw_pci_read(unsigned int domain, unsigned int bus, unsigned int devfn, | 34 | int raw_pci_read(unsigned int domain, unsigned int bus, unsigned int devfn, |
34 | int reg, int len, u32 *val) | 35 | int reg, int len, u32 *val) |
35 | { | 36 | { |
36 | if (reg < 256 && raw_pci_ops) | 37 | if (domain == 0 && reg < 256 && raw_pci_ops) |
37 | return raw_pci_ops->read(domain, bus, devfn, reg, len, val); | 38 | return raw_pci_ops->read(domain, bus, devfn, reg, len, val); |
38 | if (raw_pci_ext_ops) | 39 | if (raw_pci_ext_ops) |
39 | return raw_pci_ext_ops->read(domain, bus, devfn, reg, len, val); | 40 | return raw_pci_ext_ops->read(domain, bus, devfn, reg, len, val); |
@@ -43,7 +44,7 @@ int raw_pci_read(unsigned int domain, unsigned int bus, unsigned int devfn, | |||
43 | int raw_pci_write(unsigned int domain, unsigned int bus, unsigned int devfn, | 44 | int raw_pci_write(unsigned int domain, unsigned int bus, unsigned int devfn, |
44 | int reg, int len, u32 val) | 45 | int reg, int len, u32 val) |
45 | { | 46 | { |
46 | if (reg < 256 && raw_pci_ops) | 47 | if (domain == 0 && reg < 256 && raw_pci_ops) |
47 | return raw_pci_ops->write(domain, bus, devfn, reg, len, val); | 48 | return raw_pci_ops->write(domain, bus, devfn, reg, len, val); |
48 | if (raw_pci_ext_ops) | 49 | if (raw_pci_ext_ops) |
49 | return raw_pci_ext_ops->write(domain, bus, devfn, reg, len, val); | 50 | return raw_pci_ext_ops->write(domain, bus, devfn, reg, len, val); |
@@ -123,6 +124,21 @@ void __init dmi_check_skip_isa_align(void) | |||
123 | dmi_check_system(can_skip_pciprobe_dmi_table); | 124 | dmi_check_system(can_skip_pciprobe_dmi_table); |
124 | } | 125 | } |
125 | 126 | ||
127 | static void __devinit pcibios_fixup_device_resources(struct pci_dev *dev) | ||
128 | { | ||
129 | struct resource *rom_r = &dev->resource[PCI_ROM_RESOURCE]; | ||
130 | |||
131 | if (pci_probe & PCI_NOASSIGN_ROMS) { | ||
132 | if (rom_r->parent) | ||
133 | return; | ||
134 | if (rom_r->start) { | ||
135 | /* we deal with BIOS assigned ROM later */ | ||
136 | return; | ||
137 | } | ||
138 | rom_r->start = rom_r->end = rom_r->flags = 0; | ||
139 | } | ||
140 | } | ||
141 | |||
126 | /* | 142 | /* |
127 | * Called after each bus is probed, but before its children | 143 | * Called after each bus is probed, but before its children |
128 | * are examined. | 144 | * are examined. |
@@ -130,7 +146,11 @@ void __init dmi_check_skip_isa_align(void) | |||
130 | 146 | ||
131 | void __devinit pcibios_fixup_bus(struct pci_bus *b) | 147 | void __devinit pcibios_fixup_bus(struct pci_bus *b) |
132 | { | 148 | { |
149 | struct pci_dev *dev; | ||
150 | |||
133 | pci_read_bridge_bases(b); | 151 | pci_read_bridge_bases(b); |
152 | list_for_each_entry(dev, &b->devices, bus_list) | ||
153 | pcibios_fixup_device_resources(dev); | ||
134 | } | 154 | } |
135 | 155 | ||
136 | /* | 156 | /* |
@@ -386,7 +406,7 @@ struct pci_bus * __devinit pcibios_scan_root(int busnum) | |||
386 | 406 | ||
387 | extern u8 pci_cache_line_size; | 407 | extern u8 pci_cache_line_size; |
388 | 408 | ||
389 | static int __init pcibios_init(void) | 409 | int __init pcibios_init(void) |
390 | { | 410 | { |
391 | struct cpuinfo_x86 *c = &boot_cpu_data; | 411 | struct cpuinfo_x86 *c = &boot_cpu_data; |
392 | 412 | ||
@@ -413,8 +433,6 @@ static int __init pcibios_init(void) | |||
413 | return 0; | 433 | return 0; |
414 | } | 434 | } |
415 | 435 | ||
416 | subsys_initcall(pcibios_init); | ||
417 | |||
418 | char * __devinit pcibios_setup(char *str) | 436 | char * __devinit pcibios_setup(char *str) |
419 | { | 437 | { |
420 | if (!strcmp(str, "off")) { | 438 | if (!strcmp(str, "off")) { |
@@ -485,12 +503,18 @@ char * __devinit pcibios_setup(char *str) | |||
485 | else if (!strcmp(str, "rom")) { | 503 | else if (!strcmp(str, "rom")) { |
486 | pci_probe |= PCI_ASSIGN_ROMS; | 504 | pci_probe |= PCI_ASSIGN_ROMS; |
487 | return NULL; | 505 | return NULL; |
506 | } else if (!strcmp(str, "norom")) { | ||
507 | pci_probe |= PCI_NOASSIGN_ROMS; | ||
508 | return NULL; | ||
488 | } else if (!strcmp(str, "assign-busses")) { | 509 | } else if (!strcmp(str, "assign-busses")) { |
489 | pci_probe |= PCI_ASSIGN_ALL_BUSSES; | 510 | pci_probe |= PCI_ASSIGN_ALL_BUSSES; |
490 | return NULL; | 511 | return NULL; |
491 | } else if (!strcmp(str, "use_crs")) { | 512 | } else if (!strcmp(str, "use_crs")) { |
492 | pci_probe |= PCI_USE__CRS; | 513 | pci_probe |= PCI_USE__CRS; |
493 | return NULL; | 514 | return NULL; |
515 | } else if (!strcmp(str, "earlydump")) { | ||
516 | pci_early_dump_regs = 1; | ||
517 | return NULL; | ||
494 | } else if (!strcmp(str, "routeirq")) { | 518 | } else if (!strcmp(str, "routeirq")) { |
495 | pci_routeirq = 1; | 519 | pci_routeirq = 1; |
496 | return NULL; | 520 | return NULL; |