diff options
Diffstat (limited to 'arch/x86/pci/common.c')
-rw-r--r-- | arch/x86/pci/common.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c index 1331fcf26143..cf2e93869c48 100644 --- a/arch/x86/pci/common.c +++ b/arch/x86/pci/common.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/ioport.h> | 9 | #include <linux/ioport.h> |
10 | #include <linux/init.h> | 10 | #include <linux/init.h> |
11 | #include <linux/dmi.h> | 11 | #include <linux/dmi.h> |
12 | #include <linux/slab.h> | ||
12 | 13 | ||
13 | #include <asm/acpi.h> | 14 | #include <asm/acpi.h> |
14 | #include <asm/segment.h> | 15 | #include <asm/segment.h> |
@@ -72,12 +73,6 @@ struct pci_ops pci_root_ops = { | |||
72 | }; | 73 | }; |
73 | 74 | ||
74 | /* | 75 | /* |
75 | * legacy, numa, and acpi all want to call pcibios_scan_root | ||
76 | * from their initcalls. This flag prevents that. | ||
77 | */ | ||
78 | int pcibios_scanned; | ||
79 | |||
80 | /* | ||
81 | * This interrupt-safe spinlock protects all accesses to PCI | 76 | * This interrupt-safe spinlock protects all accesses to PCI |
82 | * configuration space. | 77 | * configuration space. |
83 | */ | 78 | */ |
@@ -410,8 +405,6 @@ struct pci_bus * __devinit pcibios_scan_root(int busnum) | |||
410 | return bus; | 405 | return bus; |
411 | } | 406 | } |
412 | 407 | ||
413 | extern u8 pci_cache_line_size; | ||
414 | |||
415 | int __init pcibios_init(void) | 408 | int __init pcibios_init(void) |
416 | { | 409 | { |
417 | struct cpuinfo_x86 *c = &boot_cpu_data; | 410 | struct cpuinfo_x86 *c = &boot_cpu_data; |
@@ -422,15 +415,19 @@ int __init pcibios_init(void) | |||
422 | } | 415 | } |
423 | 416 | ||
424 | /* | 417 | /* |
425 | * Assume PCI cacheline size of 32 bytes for all x86s except K7/K8 | 418 | * Set PCI cacheline size to that of the CPU if the CPU has reported it. |
426 | * and P4. It's also good for 386/486s (which actually have 16) | 419 | * (For older CPUs that don't support cpuid, we se it to 32 bytes |
420 | * It's also good for 386/486s (which actually have 16) | ||
427 | * as quite a few PCI devices do not support smaller values. | 421 | * as quite a few PCI devices do not support smaller values. |
428 | */ | 422 | */ |
429 | pci_cache_line_size = 32 >> 2; | 423 | if (c->x86_clflush_size > 0) { |
430 | if (c->x86 >= 6 && c->x86_vendor == X86_VENDOR_AMD) | 424 | pci_dfl_cache_line_size = c->x86_clflush_size >> 2; |
431 | pci_cache_line_size = 64 >> 2; /* K7 & K8 */ | 425 | printk(KERN_DEBUG "PCI: pci_cache_line_size set to %d bytes\n", |
432 | else if (c->x86 > 6 && c->x86_vendor == X86_VENDOR_INTEL) | 426 | pci_dfl_cache_line_size << 2); |
433 | pci_cache_line_size = 128 >> 2; /* P4 */ | 427 | } else { |
428 | pci_dfl_cache_line_size = 32 >> 2; | ||
429 | printk(KERN_DEBUG "PCI: Unknown cacheline size. Setting to 32 bytes\n"); | ||
430 | } | ||
434 | 431 | ||
435 | pcibios_resource_survey(); | 432 | pcibios_resource_survey(); |
436 | 433 | ||
@@ -518,6 +515,9 @@ char * __devinit pcibios_setup(char *str) | |||
518 | } else if (!strcmp(str, "use_crs")) { | 515 | } else if (!strcmp(str, "use_crs")) { |
519 | pci_probe |= PCI_USE__CRS; | 516 | pci_probe |= PCI_USE__CRS; |
520 | return NULL; | 517 | return NULL; |
518 | } else if (!strcmp(str, "nocrs")) { | ||
519 | pci_probe |= PCI_ROOT_NO_CRS; | ||
520 | return NULL; | ||
521 | } else if (!strcmp(str, "earlydump")) { | 521 | } else if (!strcmp(str, "earlydump")) { |
522 | pci_early_dump_regs = 1; | 522 | pci_early_dump_regs = 1; |
523 | return NULL; | 523 | return NULL; |