mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-15 09:34:17 +00:00
x86, UV: Fix for nodes with memory and no cpus
Fix initialization of UV blade information for systems that have nodes with memory but no cpus. Signed-off-by: Jack Steiner <steiner@sgi.com> LKML-Reference: <20090330140111.GA18461@sgi.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
1a544e659c
commit
6a891a24e4
@ -549,7 +549,8 @@ void __init uv_system_init(void)
|
|||||||
unsigned long gnode_upper, lowmem_redir_base, lowmem_redir_size;
|
unsigned long gnode_upper, lowmem_redir_base, lowmem_redir_size;
|
||||||
int bytes, nid, cpu, lcpu, pnode, blade, i, j, m_val, n_val;
|
int bytes, nid, cpu, lcpu, pnode, blade, i, j, m_val, n_val;
|
||||||
int max_pnode = 0;
|
int max_pnode = 0;
|
||||||
unsigned long mmr_base, present;
|
unsigned long mmr_base, present, paddr;
|
||||||
|
unsigned short pnode_mask;
|
||||||
|
|
||||||
map_low_mmrs();
|
map_low_mmrs();
|
||||||
|
|
||||||
@ -592,6 +593,7 @@ void __init uv_system_init(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pnode_mask = (1 << n_val) - 1;
|
||||||
node_id.v = uv_read_local_mmr(UVH_NODE_ID);
|
node_id.v = uv_read_local_mmr(UVH_NODE_ID);
|
||||||
gnode_upper = (((unsigned long)node_id.s.node_id) &
|
gnode_upper = (((unsigned long)node_id.s.node_id) &
|
||||||
~((1 << n_val) - 1)) << m_val;
|
~((1 << n_val) - 1)) << m_val;
|
||||||
@ -615,7 +617,7 @@ void __init uv_system_init(void)
|
|||||||
uv_cpu_hub_info(cpu)->numa_blade_id = blade;
|
uv_cpu_hub_info(cpu)->numa_blade_id = blade;
|
||||||
uv_cpu_hub_info(cpu)->blade_processor_id = lcpu;
|
uv_cpu_hub_info(cpu)->blade_processor_id = lcpu;
|
||||||
uv_cpu_hub_info(cpu)->pnode = pnode;
|
uv_cpu_hub_info(cpu)->pnode = pnode;
|
||||||
uv_cpu_hub_info(cpu)->pnode_mask = (1 << n_val) - 1;
|
uv_cpu_hub_info(cpu)->pnode_mask = pnode_mask;
|
||||||
uv_cpu_hub_info(cpu)->gpa_mask = (1 << (m_val + n_val)) - 1;
|
uv_cpu_hub_info(cpu)->gpa_mask = (1 << (m_val + n_val)) - 1;
|
||||||
uv_cpu_hub_info(cpu)->gnode_upper = gnode_upper;
|
uv_cpu_hub_info(cpu)->gnode_upper = gnode_upper;
|
||||||
uv_cpu_hub_info(cpu)->global_mmr_base = mmr_base;
|
uv_cpu_hub_info(cpu)->global_mmr_base = mmr_base;
|
||||||
@ -631,6 +633,16 @@ void __init uv_system_init(void)
|
|||||||
lcpu, blade);
|
lcpu, blade);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Add blade/pnode info for nodes without cpus */
|
||||||
|
for_each_online_node(nid) {
|
||||||
|
if (uv_node_to_blade[nid] >= 0)
|
||||||
|
continue;
|
||||||
|
paddr = node_start_pfn(nid) << PAGE_SHIFT;
|
||||||
|
pnode = (paddr >> m_val) & pnode_mask;
|
||||||
|
blade = boot_pnode_to_blade(pnode);
|
||||||
|
uv_node_to_blade[nid] = blade;
|
||||||
|
}
|
||||||
|
|
||||||
map_gru_high(max_pnode);
|
map_gru_high(max_pnode);
|
||||||
map_mmr_high(max_pnode);
|
map_mmr_high(max_pnode);
|
||||||
map_config_high(max_pnode);
|
map_config_high(max_pnode);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user