* [PATCH] x86: UV BAU partition-relative distribution map
@ 2009-04-14 15:56 Cliff Wickman
2009-04-14 18:27 ` [tip:x86/uv] x86: UV: " tip-bot for Cliff Wickman
0 siblings, 1 reply; 2+ messages in thread
From: Cliff Wickman @ 2009-04-14 15:56 UTC (permalink / raw)
To: linux-kernel; +Cc: mingo
From: Cliff Wickman <cpw@sgi.com>
This patch enables each partition's BAU distribution bit map
to be partition-relative.
The distribution bitmap had been constructed assuming 0 as the base
node number. That construct would not have allowed a total system of
greater than 256 nodes.
It also corrects an error that occurred when the first blade's nasid
was not zero. That nasid was stored as the base node.
The base node number gets added by hardware to the node numbers implied
in the distribution bitmap, resulting in invalid target nasids.
Tested on the UV hardware simulator.
Diffed against 2.6.29
Signed-off-by: Cliff Wickman <cpw@sgi.com>
---
arch/x86/kernel/tlb_uv.c | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
Index: linux/arch/x86/kernel/tlb_uv.c
===================================================================
--- linux.orig/arch/x86/kernel/tlb_uv.c
+++ linux/arch/x86/kernel/tlb_uv.c
@@ -25,6 +25,8 @@ static int uv_bau_retry_limit __read_m
/* position of pnode (which is nasid>>1): */
static int uv_nshift __read_mostly;
+/* base pnode in this partition */
+static int uv_partition_base_pnode __read_mostly;
static unsigned long uv_mmask __read_mostly;
@@ -43,7 +45,7 @@ static int __init blade_to_first_node(in
if (blade == b)
return node;
}
- BUG();
+ return -1; /* shouldn't happen */
}
/*
@@ -360,7 +362,8 @@ const struct cpumask *uv_flush_tlb_other
locals++;
continue;
}
- bau_node_set(pnode, &bau_desc->distribution);
+ bau_node_set(pnode - uv_partition_base_pnode,
+ &bau_desc->distribution);
i++;
}
if (i == 0) {
@@ -729,7 +732,12 @@ uv_activation_descriptor_init(int node,
for (i = 0, ad2 = adp; i < UV_ACTIVATION_DESCRIPTOR_SIZE; i++, ad2++) {
memset(ad2, 0, sizeof(struct bau_desc));
ad2->header.sw_ack_flag = 1;
- ad2->header.base_dest_nodeid = uv_cpu_to_pnode(0);
+ /*
+ * base_dest_nodeid is the first node in the partition, so
+ * the bit map will indicate partition-relative node numbers.
+ * note that base_dest_nodeid is actually a nasid.
+ */
+ ad2->header.base_dest_nodeid = uv_partition_base_pnode << 1;
ad2->header.command = UV_NET_ENDPOINT_INTD;
ad2->header.int_both = 1;
/*
@@ -830,6 +838,11 @@ static int __init uv_bau_init(void)
kmalloc(nblades * sizeof(struct bau_control *), GFP_KERNEL);
BUG_ON(!uv_bau_table_bases);
+ uv_partition_base_pnode = 0x7fffffff;
+ for (blade = 0; blade < nblades; blade++)
+ if (uv_blade_nr_possible_cpus(blade) &&
+ (uv_blade_to_pnode(blade) < uv_partition_base_pnode))
+ uv_partition_base_pnode = uv_blade_to_pnode(blade);
for (blade = 0; blade < nblades; blade++)
if (uv_blade_nr_possible_cpus(blade))
uv_init_blade(blade);
^ permalink raw reply [flat|nested] 2+ messages in thread
* [tip:x86/uv] x86: UV: BAU partition-relative distribution map
2009-04-14 15:56 [PATCH] x86: UV BAU partition-relative distribution map Cliff Wickman
@ 2009-04-14 18:27 ` tip-bot for Cliff Wickman
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Cliff Wickman @ 2009-04-14 18:27 UTC (permalink / raw)
To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, cpw, tglx, mingo
Commit-ID: 94ca8e4852807fc42d2f64fcaf248aafc4f2e6a7
Gitweb: http://git.kernel.org/tip/94ca8e4852807fc42d2f64fcaf248aafc4f2e6a7
Author: Cliff Wickman <cpw@sgi.com>
AuthorDate: Tue, 14 Apr 2009 10:56:48 -0500
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Tue, 14 Apr 2009 18:53:36 +0200
x86: UV: BAU partition-relative distribution map
This patch enables each partition's BAU distribution bit map
to be partition-relative.
The distribution bitmap had been constructed assuming 0 as the base
node number. That construct would not have allowed a total system of
greater than 256 nodes.
It also corrects an error that occurred when the first blade's nasid
was not zero. That nasid was stored as the base node.
The base node number gets added by hardware to the node numbers implied
in the distribution bitmap, resulting in invalid target nasids.
Tested on the UV hardware simulator.
Signed-off-by: Cliff Wickman <cpw@sgi.com>
LKML-Reference: <E1Ltl0C-0004Ob-37@eag09.americas.sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
arch/x86/kernel/tlb_uv.c | 19 ++++++++++++++++---
1 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/arch/x86/kernel/tlb_uv.c b/arch/x86/kernel/tlb_uv.c
index fced96e..98307f9 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;
/* position of pnode (which is nasid>>1): */
static int uv_nshift __read_mostly;
+/* base pnode in this partition */
+static int uv_partition_base_pnode __read_mostly;
static unsigned long uv_mmask __read_mostly;
@@ -43,7 +45,7 @@ static int __init blade_to_first_node(int blade)
if (blade == b)
return node;
}
- BUG();
+ return -1; /* shouldn't happen */
}
/*
@@ -359,7 +361,8 @@ const struct cpumask *uv_flush_tlb_others(const struct cpumask *cpumask,
locals++;
continue;
}
- bau_node_set(pnode, &bau_desc->distribution);
+ bau_node_set(pnode - uv_partition_base_pnode,
+ &bau_desc->distribution);
i++;
}
if (i == 0) {
@@ -728,7 +731,12 @@ uv_activation_descriptor_init(int node, int pnode)
for (i = 0, ad2 = adp; i < UV_ACTIVATION_DESCRIPTOR_SIZE; i++, ad2++) {
memset(ad2, 0, sizeof(struct bau_desc));
ad2->header.sw_ack_flag = 1;
- ad2->header.base_dest_nodeid = uv_cpu_to_pnode(0);
+ /*
+ * base_dest_nodeid is the first node in the partition, so
+ * the bit map will indicate partition-relative node numbers.
+ * note that base_dest_nodeid is actually a nasid.
+ */
+ ad2->header.base_dest_nodeid = uv_partition_base_pnode << 1;
ad2->header.command = UV_NET_ENDPOINT_INTD;
ad2->header.int_both = 1;
/*
@@ -825,6 +833,11 @@ static int __init uv_bau_init(void)
kmalloc(nblades * sizeof(struct bau_control *), GFP_KERNEL);
BUG_ON(!uv_bau_table_bases);
+ uv_partition_base_pnode = 0x7fffffff;
+ for (blade = 0; blade < nblades; blade++)
+ if (uv_blade_nr_possible_cpus(blade) &&
+ (uv_blade_to_pnode(blade) < uv_partition_base_pnode))
+ uv_partition_base_pnode = uv_blade_to_pnode(blade);
for (blade = 0; blade < nblades; blade++)
if (uv_blade_nr_possible_cpus(blade))
uv_init_blade(blade);
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-04-14 18:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-14 15:56 [PATCH] x86: UV BAU partition-relative distribution map Cliff Wickman
2009-04-14 18:27 ` [tip:x86/uv] x86: UV: " tip-bot for Cliff Wickman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox