diff options
author | Jack Steiner <steiner@sgi.com> | 2010-09-10 11:08:08 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-09-10 11:15:49 -0400 |
commit | 36ac4b987bea9a95217e1af552252f275ca7fc44 (patch) | |
tree | 9dbee9d347cd58bf776be39c98f83d8079fa8f6d /arch/x86/kernel | |
parent | df423dc7f2a801b9a45d7c501a8eb5c529455ea1 (diff) |
x86, UV: Fix initialization of max_pnode
Fix calculation of "max_pnode" for systems where the the highest
blade has neither cpus or memory. (And, yes, although rare this
does occur).
Signed-off-by: Jack Steiner <steiner@sgi.com>
LKML-Reference: <20100910150808.GA19802@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/apic/x2apic_uv_x.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c index 7b598b84c902..f744f54cb248 100644 --- a/arch/x86/kernel/apic/x2apic_uv_x.c +++ b/arch/x86/kernel/apic/x2apic_uv_x.c | |||
@@ -698,9 +698,11 @@ void __init uv_system_init(void) | |||
698 | for (j = 0; j < 64; j++) { | 698 | for (j = 0; j < 64; j++) { |
699 | if (!test_bit(j, &present)) | 699 | if (!test_bit(j, &present)) |
700 | continue; | 700 | continue; |
701 | uv_blade_info[blade].pnode = (i * 64 + j); | 701 | pnode = (i * 64 + j); |
702 | uv_blade_info[blade].pnode = pnode; | ||
702 | uv_blade_info[blade].nr_possible_cpus = 0; | 703 | uv_blade_info[blade].nr_possible_cpus = 0; |
703 | uv_blade_info[blade].nr_online_cpus = 0; | 704 | uv_blade_info[blade].nr_online_cpus = 0; |
705 | max_pnode = max(pnode, max_pnode); | ||
704 | blade++; | 706 | blade++; |
705 | } | 707 | } |
706 | } | 708 | } |
@@ -738,7 +740,6 @@ void __init uv_system_init(void) | |||
738 | uv_cpu_hub_info(cpu)->scir.offset = uv_scir_offset(apicid); | 740 | uv_cpu_hub_info(cpu)->scir.offset = uv_scir_offset(apicid); |
739 | uv_node_to_blade[nid] = blade; | 741 | uv_node_to_blade[nid] = blade; |
740 | uv_cpu_to_blade[cpu] = blade; | 742 | uv_cpu_to_blade[cpu] = blade; |
741 | max_pnode = max(pnode, max_pnode); | ||
742 | } | 743 | } |
743 | 744 | ||
744 | /* Add blade/pnode info for nodes without cpus */ | 745 | /* Add blade/pnode info for nodes without cpus */ |
@@ -750,7 +751,6 @@ void __init uv_system_init(void) | |||
750 | pnode = (paddr >> m_val) & pnode_mask; | 751 | pnode = (paddr >> m_val) & pnode_mask; |
751 | blade = boot_pnode_to_blade(pnode); | 752 | blade = boot_pnode_to_blade(pnode); |
752 | uv_node_to_blade[nid] = blade; | 753 | uv_node_to_blade[nid] = blade; |
753 | max_pnode = max(pnode, max_pnode); | ||
754 | } | 754 | } |
755 | 755 | ||
756 | map_gru_high(max_pnode); | 756 | map_gru_high(max_pnode); |