Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Snippets Groups Projects
Commit 40bcc69b authored by Yinghai Lu's avatar Yinghai Lu Committed by Ingo Molnar
Browse files

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: default avatarYinghai Lu <yinghai@kernel.org>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 238c6d54
No related branches found
No related tags found
No related merge requests found
...@@ -81,7 +81,6 @@ int __init k8_scan_nodes(unsigned long start, unsigned long end) ...@@ -81,7 +81,6 @@ int __init k8_scan_nodes(unsigned long start, unsigned long end)
unsigned numnodes, cores, bits, apicid_base; unsigned numnodes, cores, bits, apicid_base;
unsigned long prevbase; unsigned long prevbase;
struct bootnode nodes[8]; struct bootnode nodes[8];
unsigned char nodeids[8];
int i, j, nb, found = 0; int i, j, nb, found = 0;
u32 nodeid, reg; u32 nodeid, reg;
...@@ -110,7 +109,6 @@ int __init k8_scan_nodes(unsigned long start, unsigned long end) ...@@ -110,7 +109,6 @@ int __init k8_scan_nodes(unsigned long start, unsigned long end)
limit = read_pci_config(0, nb, 1, 0x44 + i*8); limit = read_pci_config(0, nb, 1, 0x44 + i*8);
nodeid = limit & 7; nodeid = limit & 7;
nodeids[i] = nodeid;
if ((base & 3) == 0) { if ((base & 3) == 0) {
if (i < numnodes) if (i < numnodes)
printk("Skipping disabled node %d\n", i); printk("Skipping disabled node %d\n", i);
...@@ -179,9 +177,6 @@ int __init k8_scan_nodes(unsigned long start, unsigned long end) ...@@ -179,9 +177,6 @@ int __init k8_scan_nodes(unsigned long start, unsigned long end)
nodes[nodeid].start = base; nodes[nodeid].start = base;
nodes[nodeid].end = limit; nodes[nodeid].end = limit;
e820_register_active_regions(nodeid,
nodes[nodeid].start >> PAGE_SHIFT,
nodes[nodeid].end >> PAGE_SHIFT);
prevbase = base; prevbase = base;
...@@ -211,12 +206,15 @@ int __init k8_scan_nodes(unsigned long start, unsigned long end) ...@@ -211,12 +206,15 @@ int __init k8_scan_nodes(unsigned long start, unsigned long end)
} }
for (i = 0; i < 8; i++) { for (i = 0; i < 8; i++) {
if (nodes[i].start != nodes[i].end) { if (nodes[i].start == nodes[i].end)
nodeid = nodeids[i]; continue;
for (j = apicid_base; j < cores + apicid_base; j++)
apicid_to_node[(nodeid << bits) + j] = i; e820_register_active_regions(i,
setup_node_bootmem(i, nodes[i].start, nodes[i].end); nodes[i].start >> PAGE_SHIFT,
} nodes[i].end >> PAGE_SHIFT);
for (j = apicid_base; j < cores + apicid_base; j++)
apicid_to_node[(i << bits) + j] = i;
setup_node_bootmem(i, nodes[i].start, nodes[i].end);
} }
numa_init_array(); numa_init_array();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment