]>
Commit | Line | Data |
---|---|---|
9f934a63 GKH |
1 | From c22c7aeff69796f46ae0fcec141538e28f50b24e Mon Sep 17 00:00:00 2001 |
2 | From: Robin@sgi.com <Robin@sgi.com> | |
3 | Date: Wed, 24 Nov 2010 12:56:59 -0800 | |
4 | Subject: sgi-xpc: XPC fails to discover partitions with all nasids above 128 | |
5 | ||
6 | From: Robin@sgi.com <Robin@sgi.com> | |
7 | ||
8 | commit c22c7aeff69796f46ae0fcec141538e28f50b24e upstream. | |
9 | ||
10 | UV hardware defines 256 memory protection regions versus the baseline 64 | |
11 | with increasing size for the SN2 ia64. This was overlooked when XPC was | |
12 | modified to accomodate both UV and SN2. | |
13 | ||
14 | Without this patch, a user could reconfigure their existing system and | |
15 | suddenly disable cross-partition communications with no indication of what | |
16 | has gone wrong. It also prevents larger configurations from using | |
17 | cross-partition communication. | |
18 | ||
19 | Signed-off-by: Robin Holt <holt@sgi.com> | |
20 | Signed-off-by: Andrew Morton <akpm@linux-foundation.org> | |
21 | Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | |
22 | Signed-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++) { |