7 #include <linux/sched.h>
12 #include <linux/slab.h>
16 #include <asm/segment.h>
25 static int pci_bf_sort;
26 static int smbios_type_b1_flag;
29 #ifdef CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS
44 return raw_pci_ops->read(domain, bus, devfn, reg, len, val);
54 return raw_pci_ops->write(domain, bus, devfn, reg, len, val);
63 devfn, where, size, value);
66 static int pci_write(
struct pci_bus *bus,
unsigned int devfn,
int where,
int size,
u32 value)
69 devfn, where, size, value);
96 .callback = can_skip_ioresource_align,
97 .ident =
"IBM System x3800",
104 .callback = can_skip_ioresource_align,
105 .ident =
"IBM System x3850",
112 .callback = can_skip_ioresource_align,
113 .ident =
"IBM System x3950",
141 if (bar_r->
start == 0 && bar_r->
end != 0) {
190 u8 *d = (
u8 *)dm + 4;
192 if (dm->
type != 0xB1)
194 switch (((*(
u32 *)d) >> 9) & 0x03) {
199 smbios_type_b1_flag = 1;
202 smbios_type_b1_flag = 2;
213 if (smbios_type_b1_flag == 1) {
228 " (pci=assign-busses)\n", d->
ident);
237 pci_add_flags(PCI_SCAN_ALL_PCIE_DEVS);
241 static const struct dmi_system_id __devinitconst pciprobe_dmi_table[] = {
247 .callback = assign_all_busses,
248 .ident =
"Samsung X20 Laptop",
256 .callback = set_bf_sort,
257 .ident =
"Dell PowerEdge 1950",
264 .callback = set_bf_sort,
265 .ident =
"Dell PowerEdge 1955",
272 .callback = set_bf_sort,
273 .ident =
"Dell PowerEdge 2900",
280 .callback = set_bf_sort,
281 .ident =
"Dell PowerEdge 2950",
288 .callback = set_bf_sort,
289 .ident =
"Dell PowerEdge R900",
296 .callback = find_sort_method,
297 .ident =
"Dell System",
303 .callback = set_bf_sort,
304 .ident =
"HP ProLiant BL20p G3",
311 .callback = set_bf_sort,
312 .ident =
"HP ProLiant BL20p G4",
319 .callback = set_bf_sort,
320 .ident =
"HP ProLiant BL30p G1",
327 .callback = set_bf_sort,
328 .ident =
"HP ProLiant BL25p G1",
335 .callback = set_bf_sort,
336 .ident =
"HP ProLiant BL35p G1",
343 .callback = set_bf_sort,
344 .ident =
"HP ProLiant BL45p G1",
351 .callback = set_bf_sort,
352 .ident =
"HP ProLiant BL45p G2",
359 .callback = set_bf_sort,
360 .ident =
"HP ProLiant BL460c G1",
367 .callback = set_bf_sort,
368 .ident =
"HP ProLiant BL465c G1",
375 .callback = set_bf_sort,
376 .ident =
"HP ProLiant BL480c G1",
383 .callback = set_bf_sort,
384 .ident =
"HP ProLiant BL685c G1",
391 .callback = set_bf_sort,
392 .ident =
"HP ProLiant DL360",
399 .callback = set_bf_sort,
400 .ident =
"HP ProLiant DL380",
408 .callback = assign_all_busses,
409 .ident =
"Compaq EVO N800c",
417 .callback = set_bf_sort,
418 .ident =
"HP ProLiant DL385 G2",
425 .callback = set_bf_sort,
426 .ident =
"HP ProLiant DL585 G2",
433 .callback = set_scan_all,
434 .ident =
"Stratus/NEC ftServer",
452 if (bus->
number == busnum) {
459 get_mp_bus_to_node(busnum));
499 if (!
strcmp(str,
"off")) {
502 }
else if (!
strcmp(str,
"bfsort")) {
505 }
else if (!
strcmp(str,
"nobfsort")) {
509 #ifdef CONFIG_PCI_BIOS
510 else if (!
strcmp(str,
"bios")) {
513 }
else if (!
strcmp(str,
"nobios")) {
516 }
else if (!
strcmp(str,
"biosirq")) {
519 }
else if (!
strncmp(str,
"pirqaddr=", 9)) {
524 #ifdef CONFIG_PCI_DIRECT
525 else if (!
strcmp(str,
"conf1")) {
529 else if (!
strcmp(str,
"conf2")) {
534 #ifdef CONFIG_PCI_MMCONFIG
535 else if (!
strcmp(str,
"nommconf")) {
539 else if (!
strcmp(str,
"check_enable_amd_mmconf")) {
544 else if (!
strcmp(str,
"noacpi")) {
548 else if (!
strcmp(str,
"noearly")) {
552 #ifndef CONFIG_X86_VISWS
553 else if (!
strcmp(str,
"usepirqmask")) {
556 }
else if (!
strncmp(str,
"irqmask=", 8)) {
559 }
else if (!
strncmp(str,
"lastbus=", 8)) {
564 else if (!
strcmp(str,
"rom")) {
567 }
else if (!
strcmp(str,
"norom")) {
570 }
else if (!
strcmp(str,
"nobar")) {
573 }
else if (!
strcmp(str,
"assign-busses")) {
576 }
else if (!
strcmp(str,
"use_crs")) {
579 }
else if (!
strcmp(str,
"nocrs")) {
582 }
else if (!
strcmp(str,
"earlydump")) {
585 }
else if (!
strcmp(str,
"routeirq")) {
588 }
else if (!
strcmp(str,
"skip_isa_align")) {
591 }
else if (!
strcmp(str,
"noioapicquirk")) {
594 }
else if (!
strcmp(str,
"ioapicreroute")) {
598 }
else if (!
strcmp(str,
"noioapicreroute")) {
618 if (!pci_dev_msi_enabled(dev))
641 struct pci_sysdata *
sd;
684 static int mp_bus_to_node[BUS_NR] = {
685 [0 ... BUS_NR - 1] = -1
690 if (busnum >= 0 && busnum < BUS_NR)
694 int get_mp_bus_to_node(
int busnum)
698 if (busnum < 0 || busnum > (BUS_NR - 1))
701 node = mp_bus_to_node[
busnum];
715 static int mp_bus_to_node[BUS_NR] = {
716 [0 ... BUS_NR - 1] = -1
719 void set_mp_bus_to_node(
int busnum,
int node)
721 if (busnum >= 0 && busnum < BUS_NR)
722 mp_bus_to_node[
busnum] = (
unsigned char) node;
725 int get_mp_bus_to_node(
int busnum)
729 if (busnum < 0 || busnum > (BUS_NR - 1))
731 node = mp_bus_to_node[
busnum];