aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/sgi-xp/xpc_partition.c
diff options
context:
space:
mode:
authorRobin Holt <holt@sgi.com>2009-12-15 19:47:56 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-16 10:20:14 -0500
commitc2c9f115741453715d6b4da1cd2de65af8c7ad86 (patch)
tree8e20a0641c622b07b3c7380f81a5552e20e1c8d1 /drivers/misc/sgi-xp/xpc_partition.c
parent289750d1f1fd4a715baa2a2c6dd0cec2b8317fd7 (diff)
x86: uv: update XPC to handle updated BIOS interface
The UV BIOS has moved the location of some of their pointers to the "partition reserved page" from memory into a uv hub MMR. The GRU does not support bcopy operations from MMR space so we need to special case the MMR addresses using VLOAD operations. Additionally, the BIOS call for registering a message queue watchlist has removed the 'blade' value and eliminated the structure that was being passed in. This is also reflected in this patch. Signed-off-by: Robin Holt <holt@sgi.com> Cc: Jack Steiner <steiner@sgi.com> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/misc/sgi-xp/xpc_partition.c')
-rw-r--r--drivers/misc/sgi-xp/xpc_partition.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/misc/sgi-xp/xpc_partition.c b/drivers/misc/sgi-xp/xpc_partition.c
index 65877bc5edaa..9a6268c89fdd 100644
--- a/drivers/misc/sgi-xp/xpc_partition.c
+++ b/drivers/misc/sgi-xp/xpc_partition.c
@@ -18,6 +18,7 @@
18#include <linux/device.h> 18#include <linux/device.h>
19#include <linux/hardirq.h> 19#include <linux/hardirq.h>
20#include "xpc.h" 20#include "xpc.h"
21#include <asm/uv/uv_hub.h>
21 22
22/* XPC is exiting flag */ 23/* XPC is exiting flag */
23int xpc_exiting; 24int xpc_exiting;
@@ -92,8 +93,12 @@ xpc_get_rsvd_page_pa(int nasid)
92 break; 93 break;
93 94
94 /* !!! L1_CACHE_ALIGN() is only a sn2-bte_copy requirement */ 95 /* !!! L1_CACHE_ALIGN() is only a sn2-bte_copy requirement */
95 if (L1_CACHE_ALIGN(len) > buf_len) { 96 if (is_shub())
96 kfree(buf_base); 97 len = L1_CACHE_ALIGN(len);
98
99 if (len > buf_len) {
100 if (buf_base != NULL)
101 kfree(buf_base);
97 buf_len = L1_CACHE_ALIGN(len); 102 buf_len = L1_CACHE_ALIGN(len);
98 buf = xpc_kmalloc_cacheline_aligned(buf_len, GFP_KERNEL, 103 buf = xpc_kmalloc_cacheline_aligned(buf_len, GFP_KERNEL,
99 &buf_base); 104 &buf_base);
@@ -105,7 +110,7 @@ xpc_get_rsvd_page_pa(int nasid)
105 } 110 }
106 } 111 }
107 112
108 ret = xp_remote_memcpy(xp_pa(buf), rp_pa, buf_len); 113 ret = xp_remote_memcpy(xp_pa(buf), rp_pa, len);
109 if (ret != xpSuccess) { 114 if (ret != xpSuccess) {
110 dev_dbg(xpc_part, "xp_remote_memcpy failed %d\n", ret); 115 dev_dbg(xpc_part, "xp_remote_memcpy failed %d\n", ret);
111 break; 116 break;
@@ -143,7 +148,7 @@ xpc_setup_rsvd_page(void)
143 dev_err(xpc_part, "SAL failed to locate the reserved page\n"); 148 dev_err(xpc_part, "SAL failed to locate the reserved page\n");
144 return -ESRCH; 149 return -ESRCH;
145 } 150 }
146 rp = (struct xpc_rsvd_page *)__va(rp_pa); 151 rp = (struct xpc_rsvd_page *)__va(xp_socket_pa(rp_pa));
147 152
148 if (rp->SAL_version < 3) { 153 if (rp->SAL_version < 3) {
149 /* SAL_versions < 3 had a SAL_partid defined as a u8 */ 154 /* SAL_versions < 3 had a SAL_partid defined as a u8 */