]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/2.6.36.2/sgi-xpc-xpc-fails-to-discover-partitions-with-all-nasids-above-128.patch
fixes for 4.19
[thirdparty/kernel/stable-queue.git] / releases / 2.6.36.2 / sgi-xpc-xpc-fails-to-discover-partitions-with-all-nasids-above-128.patch
CommitLineData
9f934a63
GKH
1From c22c7aeff69796f46ae0fcec141538e28f50b24e Mon Sep 17 00:00:00 2001
2From: Robin@sgi.com <Robin@sgi.com>
3Date: Wed, 24 Nov 2010 12:56:59 -0800
4Subject: sgi-xpc: XPC fails to discover partitions with all nasids above 128
5
6From: Robin@sgi.com <Robin@sgi.com>
7
8commit c22c7aeff69796f46ae0fcec141538e28f50b24e upstream.
9
10UV hardware defines 256 memory protection regions versus the baseline 64
11with increasing size for the SN2 ia64. This was overlooked when XPC was
12modified to accomodate both UV and SN2.
13
14Without this patch, a user could reconfigure their existing system and
15suddenly disable cross-partition communications with no indication of what
16has gone wrong. It also prevents larger configurations from using
17cross-partition communication.
18
19Signed-off-by: Robin Holt <holt@sgi.com>
20Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
21Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
22Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
23
24---
25 drivers/misc/sgi-xp/xpc_partition.c | 25 +++++++++++++++----------
26 1 file changed, 15 insertions(+), 10 deletions(-)
27
28--- a/drivers/misc/sgi-xp/xpc_partition.c
29+++ b/drivers/misc/sgi-xp/xpc_partition.c
30@@ -439,18 +439,23 @@ xpc_discovery(void)
31 * nodes that can comprise an access protection grouping. The access
32 * protection is in regards to memory, IOI and IPI.
33 */
34- max_regions = 64;
35 region_size = xp_region_size;
36
37- switch (region_size) {
38- case 128:
39- max_regions *= 2;
40- case 64:
41- max_regions *= 2;
42- case 32:
43- max_regions *= 2;
44- region_size = 16;
45- DBUG_ON(!is_shub2());
46+ if (is_uv())
47+ max_regions = 256;
48+ else {
49+ max_regions = 64;
50+
51+ switch (region_size) {
52+ case 128:
53+ max_regions *= 2;
54+ case 64:
55+ max_regions *= 2;
56+ case 32:
57+ max_regions *= 2;
58+ region_size = 16;
59+ DBUG_ON(!is_shub2());
60+ }
61 }
62
63 for (region = 0; region < max_regions; region++) {