diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-07-15 07:45:59 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-15 07:45:59 -0400 |
commit | 91d0322bef047e2916b3e52741411bffc63929cb (patch) | |
tree | 44c4fd13cc17755a6db8a3d70cffb86e57a838dc /arch/x86/mm/k8topology_64.c | |
parent | 065cb3dfe24978651caedfa54da585388ad15dde (diff) | |
parent | 50515af207d410c9f228380e529c56f43c3de0bd (diff) |
Merge branch 'linus' into x86/urgent
Diffstat (limited to 'arch/x86/mm/k8topology_64.c')
-rw-r--r-- | arch/x86/mm/k8topology_64.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/arch/x86/mm/k8topology_64.c b/arch/x86/mm/k8topology_64.c index 1f476e477844..41f1b5c00a1d 100644 --- a/arch/x86/mm/k8topology_64.c +++ b/arch/x86/mm/k8topology_64.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <asm/numa.h> | 22 | #include <asm/numa.h> |
23 | #include <asm/mpspec.h> | 23 | #include <asm/mpspec.h> |
24 | #include <asm/apic.h> | 24 | #include <asm/apic.h> |
25 | #include <asm/k8.h> | ||
25 | 26 | ||
26 | static __init int find_northbridge(void) | 27 | static __init int find_northbridge(void) |
27 | { | 28 | { |
@@ -56,34 +57,33 @@ static __init void early_get_boot_cpu_id(void) | |||
56 | /* | 57 | /* |
57 | * Find possible boot-time SMP configuration: | 58 | * Find possible boot-time SMP configuration: |
58 | */ | 59 | */ |
60 | #ifdef CONFIG_X86_MPPARSE | ||
59 | early_find_smp_config(); | 61 | early_find_smp_config(); |
62 | #endif | ||
60 | #ifdef CONFIG_ACPI | 63 | #ifdef CONFIG_ACPI |
61 | /* | 64 | /* |
62 | * Read APIC information from ACPI tables. | 65 | * Read APIC information from ACPI tables. |
63 | */ | 66 | */ |
64 | early_acpi_boot_init(); | 67 | early_acpi_boot_init(); |
65 | #endif | 68 | #endif |
69 | #ifdef CONFIG_X86_MPPARSE | ||
66 | /* | 70 | /* |
67 | * get boot-time SMP configuration: | 71 | * get boot-time SMP configuration: |
68 | */ | 72 | */ |
69 | if (smp_found_config) | 73 | if (smp_found_config) |
70 | early_get_smp_config(); | 74 | early_get_smp_config(); |
75 | #endif | ||
71 | early_init_lapic_mapping(); | 76 | early_init_lapic_mapping(); |
72 | } | 77 | } |
73 | 78 | ||
74 | int __init k8_scan_nodes(unsigned long start, unsigned long end) | 79 | int __init k8_scan_nodes(unsigned long start, unsigned long end) |
75 | { | 80 | { |
81 | unsigned numnodes, cores, bits, apicid_base; | ||
76 | unsigned long prevbase; | 82 | unsigned long prevbase; |
77 | struct bootnode nodes[8]; | 83 | struct bootnode nodes[8]; |
78 | int nodeid, i, nb; | ||
79 | unsigned char nodeids[8]; | 84 | unsigned char nodeids[8]; |
80 | int found = 0; | 85 | int i, j, nb, found = 0; |
81 | u32 reg; | 86 | u32 nodeid, reg; |
82 | unsigned numnodes; | ||
83 | unsigned cores; | ||
84 | unsigned bits; | ||
85 | int j; | ||
86 | unsigned apicid_base; | ||
87 | 87 | ||
88 | if (!early_pci_allowed()) | 88 | if (!early_pci_allowed()) |
89 | return -1; | 89 | return -1; |
@@ -105,7 +105,6 @@ int __init k8_scan_nodes(unsigned long start, unsigned long end) | |||
105 | prevbase = 0; | 105 | prevbase = 0; |
106 | for (i = 0; i < 8; i++) { | 106 | for (i = 0; i < 8; i++) { |
107 | unsigned long base, limit; | 107 | unsigned long base, limit; |
108 | u32 nodeid; | ||
109 | 108 | ||
110 | base = read_pci_config(0, nb, 1, 0x40 + i*8); | 109 | base = read_pci_config(0, nb, 1, 0x40 + i*8); |
111 | limit = read_pci_config(0, nb, 1, 0x44 + i*8); | 110 | limit = read_pci_config(0, nb, 1, 0x44 + i*8); |
@@ -144,8 +143,8 @@ int __init k8_scan_nodes(unsigned long start, unsigned long end) | |||
144 | limit |= (1<<24)-1; | 143 | limit |= (1<<24)-1; |
145 | limit++; | 144 | limit++; |
146 | 145 | ||
147 | if (limit > end_pfn << PAGE_SHIFT) | 146 | if (limit > max_pfn << PAGE_SHIFT) |
148 | limit = end_pfn << PAGE_SHIFT; | 147 | limit = max_pfn << PAGE_SHIFT; |
149 | if (limit <= base) | 148 | if (limit <= base) |
150 | continue; | 149 | continue; |
151 | 150 | ||