diff options
Diffstat (limited to 'arch/x86/kernel/apic/x2apic_uv_x.c')
-rw-r--r-- | arch/x86/kernel/apic/x2apic_uv_x.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c index 49d2f5c739b7..d6712334ce4b 100644 --- a/arch/x86/kernel/apic/x2apic_uv_x.c +++ b/arch/x86/kernel/apic/x2apic_uv_x.c | |||
@@ -563,7 +563,8 @@ void __init uv_system_init(void) | |||
563 | unsigned long gnode_upper, lowmem_redir_base, lowmem_redir_size; | 563 | unsigned long gnode_upper, lowmem_redir_base, lowmem_redir_size; |
564 | int bytes, nid, cpu, lcpu, pnode, blade, i, j, m_val, n_val; | 564 | int bytes, nid, cpu, lcpu, pnode, blade, i, j, m_val, n_val; |
565 | int max_pnode = 0; | 565 | int max_pnode = 0; |
566 | unsigned long mmr_base, present; | 566 | unsigned long mmr_base, present, paddr; |
567 | unsigned short pnode_mask; | ||
567 | 568 | ||
568 | map_low_mmrs(); | 569 | map_low_mmrs(); |
569 | 570 | ||
@@ -606,6 +607,7 @@ void __init uv_system_init(void) | |||
606 | } | 607 | } |
607 | } | 608 | } |
608 | 609 | ||
610 | pnode_mask = (1 << n_val) - 1; | ||
609 | node_id.v = uv_read_local_mmr(UVH_NODE_ID); | 611 | node_id.v = uv_read_local_mmr(UVH_NODE_ID); |
610 | gnode_upper = (((unsigned long)node_id.s.node_id) & | 612 | gnode_upper = (((unsigned long)node_id.s.node_id) & |
611 | ~((1 << n_val) - 1)) << m_val; | 613 | ~((1 << n_val) - 1)) << m_val; |
@@ -629,7 +631,7 @@ void __init uv_system_init(void) | |||
629 | uv_cpu_hub_info(cpu)->numa_blade_id = blade; | 631 | uv_cpu_hub_info(cpu)->numa_blade_id = blade; |
630 | uv_cpu_hub_info(cpu)->blade_processor_id = lcpu; | 632 | uv_cpu_hub_info(cpu)->blade_processor_id = lcpu; |
631 | uv_cpu_hub_info(cpu)->pnode = pnode; | 633 | uv_cpu_hub_info(cpu)->pnode = pnode; |
632 | uv_cpu_hub_info(cpu)->pnode_mask = (1 << n_val) - 1; | 634 | uv_cpu_hub_info(cpu)->pnode_mask = pnode_mask; |
633 | uv_cpu_hub_info(cpu)->gpa_mask = (1 << (m_val + n_val)) - 1; | 635 | uv_cpu_hub_info(cpu)->gpa_mask = (1 << (m_val + n_val)) - 1; |
634 | uv_cpu_hub_info(cpu)->gnode_upper = gnode_upper; | 636 | uv_cpu_hub_info(cpu)->gnode_upper = gnode_upper; |
635 | uv_cpu_hub_info(cpu)->global_mmr_base = mmr_base; | 637 | uv_cpu_hub_info(cpu)->global_mmr_base = mmr_base; |
@@ -645,6 +647,16 @@ void __init uv_system_init(void) | |||
645 | lcpu, blade); | 647 | lcpu, blade); |
646 | } | 648 | } |
647 | 649 | ||
650 | /* Add blade/pnode info for nodes without cpus */ | ||
651 | for_each_online_node(nid) { | ||
652 | if (uv_node_to_blade[nid] >= 0) | ||
653 | continue; | ||
654 | paddr = node_start_pfn(nid) << PAGE_SHIFT; | ||
655 | pnode = (paddr >> m_val) & pnode_mask; | ||
656 | blade = boot_pnode_to_blade(pnode); | ||
657 | uv_node_to_blade[nid] = blade; | ||
658 | } | ||
659 | |||
648 | map_gru_high(max_pnode); | 660 | map_gru_high(max_pnode); |
649 | map_mmr_high(max_pnode); | 661 | map_mmr_high(max_pnode); |
650 | map_config_high(max_pnode); | 662 | map_config_high(max_pnode); |