diff options
author | Alex Nixon <alex.nixon@citrix.com> | 2010-03-18 14:28:12 -0400 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2010-10-18 10:49:30 -0400 |
commit | 44de3395a4bb61341dfb7b3b7c94edfddeabae4b (patch) | |
tree | e5c517f25948852de284ffa15702f4f2a08301dd /arch | |
parent | 15ebbb82bac700db3c91e662fb70cb3559e9d930 (diff) |
x86/PCI: Clean up pci_cache_line_size
Separate out x86 cache_line_size initialisation code into its own
function (so it can be shared by Xen later in this patch series)
[ Impact: cleanup ]
Signed-off-by: Alex Nixon <alex.nixon@citrix.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: "H. Peter Anvin" <hpa@zytor.com>
Reviewed-by: Matthew Wilcox <willy@linux.intel.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: x86@kernel.org
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/include/asm/pci_x86.h | 1 | ||||
-rw-r--r-- | arch/x86/pci/common.c | 17 |
2 files changed, 11 insertions, 7 deletions
diff --git a/arch/x86/include/asm/pci_x86.h b/arch/x86/include/asm/pci_x86.h index 49c7219826f9..704526734bef 100644 --- a/arch/x86/include/asm/pci_x86.h +++ b/arch/x86/include/asm/pci_x86.h | |||
@@ -47,6 +47,7 @@ enum pci_bf_sort_state { | |||
47 | extern unsigned int pcibios_max_latency; | 47 | extern unsigned int pcibios_max_latency; |
48 | 48 | ||
49 | void pcibios_resource_survey(void); | 49 | void pcibios_resource_survey(void); |
50 | void pcibios_set_cache_line_size(void); | ||
50 | 51 | ||
51 | /* pci-pc.c */ | 52 | /* pci-pc.c */ |
52 | 53 | ||
diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c index a0772af64efb..f7c8a399978c 100644 --- a/arch/x86/pci/common.c +++ b/arch/x86/pci/common.c | |||
@@ -421,16 +421,10 @@ struct pci_bus * __devinit pcibios_scan_root(int busnum) | |||
421 | 421 | ||
422 | return bus; | 422 | return bus; |
423 | } | 423 | } |
424 | 424 | void __init pcibios_set_cache_line_size(void) | |
425 | int __init pcibios_init(void) | ||
426 | { | 425 | { |
427 | struct cpuinfo_x86 *c = &boot_cpu_data; | 426 | struct cpuinfo_x86 *c = &boot_cpu_data; |
428 | 427 | ||
429 | if (!raw_pci_ops) { | ||
430 | printk(KERN_WARNING "PCI: System does not support PCI\n"); | ||
431 | return 0; | ||
432 | } | ||
433 | |||
434 | /* | 428 | /* |
435 | * Set PCI cacheline size to that of the CPU if the CPU has reported it. | 429 | * Set PCI cacheline size to that of the CPU if the CPU has reported it. |
436 | * (For older CPUs that don't support cpuid, we se it to 32 bytes | 430 | * (For older CPUs that don't support cpuid, we se it to 32 bytes |
@@ -445,7 +439,16 @@ int __init pcibios_init(void) | |||
445 | pci_dfl_cache_line_size = 32 >> 2; | 439 | pci_dfl_cache_line_size = 32 >> 2; |
446 | printk(KERN_DEBUG "PCI: Unknown cacheline size. Setting to 32 bytes\n"); | 440 | printk(KERN_DEBUG "PCI: Unknown cacheline size. Setting to 32 bytes\n"); |
447 | } | 441 | } |
442 | } | ||
443 | |||
444 | int __init pcibios_init(void) | ||
445 | { | ||
446 | if (!raw_pci_ops) { | ||
447 | printk(KERN_WARNING "PCI: System does not support PCI\n"); | ||
448 | return 0; | ||
449 | } | ||
448 | 450 | ||
451 | pcibios_set_cache_line_size(); | ||
449 | pcibios_resource_survey(); | 452 | pcibios_resource_survey(); |
450 | 453 | ||
451 | if (pci_bf_sort >= pci_force_bf) | 454 | if (pci_bf_sort >= pci_force_bf) |