diff options
author | Yinghai Lu <yinghai@kernel.org> | 2009-01-05 21:39:01 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-06 07:21:21 -0500 |
commit | 40bcc69b399ddbcd2d5c52b277a1b27398339b27 (patch) | |
tree | 05779eda0123974b485f21e2f7cef2aa706328aa /arch | |
parent | 238c6d54830c624f34ac9cf123ac04aebfca5013 (diff) |
x86: k8 numa register active regions later
Impact: cleanup
don't register early, so we don't need to clear actived regions if it fail
to get node hash shift or wild set in nb config.
also remove nodeids array that is not needed
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/mm/k8topology_64.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/arch/x86/mm/k8topology_64.c b/arch/x86/mm/k8topology_64.c index 41f1b5c00a1d..268f8255280f 100644 --- a/arch/x86/mm/k8topology_64.c +++ b/arch/x86/mm/k8topology_64.c | |||
@@ -81,7 +81,6 @@ int __init k8_scan_nodes(unsigned long start, unsigned long end) | |||
81 | unsigned numnodes, cores, bits, apicid_base; | 81 | unsigned numnodes, cores, bits, apicid_base; |
82 | unsigned long prevbase; | 82 | unsigned long prevbase; |
83 | struct bootnode nodes[8]; | 83 | struct bootnode nodes[8]; |
84 | unsigned char nodeids[8]; | ||
85 | int i, j, nb, found = 0; | 84 | int i, j, nb, found = 0; |
86 | u32 nodeid, reg; | 85 | u32 nodeid, reg; |
87 | 86 | ||
@@ -110,7 +109,6 @@ int __init k8_scan_nodes(unsigned long start, unsigned long end) | |||
110 | limit = read_pci_config(0, nb, 1, 0x44 + i*8); | 109 | limit = read_pci_config(0, nb, 1, 0x44 + i*8); |
111 | 110 | ||
112 | nodeid = limit & 7; | 111 | nodeid = limit & 7; |
113 | nodeids[i] = nodeid; | ||
114 | if ((base & 3) == 0) { | 112 | if ((base & 3) == 0) { |
115 | if (i < numnodes) | 113 | if (i < numnodes) |
116 | printk("Skipping disabled node %d\n", i); | 114 | printk("Skipping disabled node %d\n", i); |
@@ -179,9 +177,6 @@ int __init k8_scan_nodes(unsigned long start, unsigned long end) | |||
179 | 177 | ||
180 | nodes[nodeid].start = base; | 178 | nodes[nodeid].start = base; |
181 | nodes[nodeid].end = limit; | 179 | nodes[nodeid].end = limit; |
182 | e820_register_active_regions(nodeid, | ||
183 | nodes[nodeid].start >> PAGE_SHIFT, | ||
184 | nodes[nodeid].end >> PAGE_SHIFT); | ||
185 | 180 | ||
186 | prevbase = base; | 181 | prevbase = base; |
187 | 182 | ||
@@ -211,12 +206,15 @@ int __init k8_scan_nodes(unsigned long start, unsigned long end) | |||
211 | } | 206 | } |
212 | 207 | ||
213 | for (i = 0; i < 8; i++) { | 208 | for (i = 0; i < 8; i++) { |
214 | if (nodes[i].start != nodes[i].end) { | 209 | if (nodes[i].start == nodes[i].end) |
215 | nodeid = nodeids[i]; | 210 | continue; |
216 | for (j = apicid_base; j < cores + apicid_base; j++) | 211 | |
217 | apicid_to_node[(nodeid << bits) + j] = i; | 212 | e820_register_active_regions(i, |
218 | setup_node_bootmem(i, nodes[i].start, nodes[i].end); | 213 | nodes[i].start >> PAGE_SHIFT, |
219 | } | 214 | nodes[i].end >> PAGE_SHIFT); |
215 | for (j = apicid_base; j < cores + apicid_base; j++) | ||
216 | apicid_to_node[(i << bits) + j] = i; | ||
217 | setup_node_bootmem(i, nodes[i].start, nodes[i].end); | ||
220 | } | 218 | } |
221 | 219 | ||
222 | numa_init_array(); | 220 | numa_init_array(); |