aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/tlb_uv.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/arch/x86/kernel/tlb_uv.c b/arch/x86/kernel/tlb_uv.c
index fced96e94e22..98307f953492 100644
--- a/arch/x86/kernel/tlb_uv.c
+++ b/arch/x86/kernel/tlb_uv.c
@@ -25,6 +25,8 @@ static int uv_bau_retry_limit __read_mostly;
25 25
26/* position of pnode (which is nasid>>1): */ 26/* position of pnode (which is nasid>>1): */
27static int uv_nshift __read_mostly; 27static int uv_nshift __read_mostly;
28/* base pnode in this partition */
29static int uv_partition_base_pnode __read_mostly;
28 30
29static unsigned long uv_mmask __read_mostly; 31static unsigned long uv_mmask __read_mostly;
30 32
@@ -43,7 +45,7 @@ static int __init blade_to_first_node(int blade)
43 if (blade == b) 45 if (blade == b)
44 return node; 46 return node;
45 } 47 }
46 BUG(); 48 return -1; /* shouldn't happen */
47} 49}
48 50
49/* 51/*
@@ -359,7 +361,8 @@ const struct cpumask *uv_flush_tlb_others(const struct cpumask *cpumask,
359 locals++; 361 locals++;
360 continue; 362 continue;
361 } 363 }
362 bau_node_set(pnode, &bau_desc->distribution); 364 bau_node_set(pnode - uv_partition_base_pnode,
365 &bau_desc->distribution);
363 i++; 366 i++;
364 } 367 }
365 if (i == 0) { 368 if (i == 0) {
@@ -728,7 +731,12 @@ uv_activation_descriptor_init(int node, int pnode)
728 for (i = 0, ad2 = adp; i < UV_ACTIVATION_DESCRIPTOR_SIZE; i++, ad2++) { 731 for (i = 0, ad2 = adp; i < UV_ACTIVATION_DESCRIPTOR_SIZE; i++, ad2++) {
729 memset(ad2, 0, sizeof(struct bau_desc)); 732 memset(ad2, 0, sizeof(struct bau_desc));
730 ad2->header.sw_ack_flag = 1; 733 ad2->header.sw_ack_flag = 1;
731 ad2->header.base_dest_nodeid = uv_cpu_to_pnode(0); 734 /*
735 * base_dest_nodeid is the first node in the partition, so
736 * the bit map will indicate partition-relative node numbers.
737 * note that base_dest_nodeid is actually a nasid.
738 */
739 ad2->header.base_dest_nodeid = uv_partition_base_pnode << 1;
732 ad2->header.command = UV_NET_ENDPOINT_INTD; 740 ad2->header.command = UV_NET_ENDPOINT_INTD;
733 ad2->header.int_both = 1; 741 ad2->header.int_both = 1;
734 /* 742 /*
@@ -825,6 +833,11 @@ static int __init uv_bau_init(void)
825 kmalloc(nblades * sizeof(struct bau_control *), GFP_KERNEL); 833 kmalloc(nblades * sizeof(struct bau_control *), GFP_KERNEL);
826 BUG_ON(!uv_bau_table_bases); 834 BUG_ON(!uv_bau_table_bases);
827 835
836 uv_partition_base_pnode = 0x7fffffff;
837 for (blade = 0; blade < nblades; blade++)
838 if (uv_blade_nr_possible_cpus(blade) &&
839 (uv_blade_to_pnode(blade) < uv_partition_base_pnode))
840 uv_partition_base_pnode = uv_blade_to_pnode(blade);
828 for (blade = 0; blade < nblades; blade++) 841 for (blade = 0; blade < nblades; blade++)
829 if (uv_blade_nr_possible_cpus(blade)) 842 if (uv_blade_nr_possible_cpus(blade))
830 uv_init_blade(blade); 843 uv_init_blade(blade);