aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/sgi-xp/xpc_channel.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/sgi-xp/xpc_channel.c')
-rw-r--r--drivers/misc/sgi-xp/xpc_channel.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/drivers/misc/sgi-xp/xpc_channel.c b/drivers/misc/sgi-xp/xpc_channel.c
index 12d8eb6957a7..9e79ad7eafe5 100644
--- a/drivers/misc/sgi-xp/xpc_channel.c
+++ b/drivers/misc/sgi-xp/xpc_channel.c
@@ -21,7 +21,6 @@
21#include <linux/interrupt.h> 21#include <linux/interrupt.h>
22#include <linux/mutex.h> 22#include <linux/mutex.h>
23#include <linux/completion.h> 23#include <linux/completion.h>
24#include <asm/sn/bte.h>
25#include <asm/sn/sn_sal.h> 24#include <asm/sn/sn_sal.h>
26#include "xpc.h" 25#include "xpc.h"
27 26
@@ -252,13 +251,13 @@ xpc_setup_infrastructure(struct xpc_partition *part)
252 * 251 *
253 * src must be a cacheline aligned physical address on the remote partition. 252 * src must be a cacheline aligned physical address on the remote partition.
254 * dst must be a cacheline aligned virtual address on this partition. 253 * dst must be a cacheline aligned virtual address on this partition.
255 * cnt must be an cacheline sized 254 * cnt must be cacheline sized
256 */ 255 */
257static enum xp_retval 256static enum xp_retval
258xpc_pull_remote_cachelines(struct xpc_partition *part, void *dst, 257xpc_pull_remote_cachelines(struct xpc_partition *part, void *dst,
259 const void *src, size_t cnt) 258 const void *src, size_t cnt)
260{ 259{
261 bte_result_t bte_ret; 260 enum xp_retval ret;
262 261
263 DBUG_ON((u64)src != L1_CACHE_ALIGN((u64)src)); 262 DBUG_ON((u64)src != L1_CACHE_ALIGN((u64)src));
264 DBUG_ON((u64)dst != L1_CACHE_ALIGN((u64)dst)); 263 DBUG_ON((u64)dst != L1_CACHE_ALIGN((u64)dst));
@@ -267,15 +266,12 @@ xpc_pull_remote_cachelines(struct xpc_partition *part, void *dst,
267 if (part->act_state == XPC_P_DEACTIVATING) 266 if (part->act_state == XPC_P_DEACTIVATING)
268 return part->reason; 267 return part->reason;
269 268
270 bte_ret = xp_bte_copy((u64)src, (u64)dst, (u64)cnt, 269 ret = xp_remote_memcpy(dst, src, cnt);
271 (BTE_NORMAL | BTE_WACQUIRE), NULL); 270 if (ret != xpSuccess) {
272 if (bte_ret == BTE_SUCCESS) 271 dev_dbg(xpc_chan, "xp_remote_memcpy() from partition %d failed,"
273 return xpSuccess; 272 " ret=%d\n", XPC_PARTID(part), ret);
274 273 }
275 dev_dbg(xpc_chan, "xp_bte_copy() from partition %d failed, ret=%d\n", 274 return ret;
276 XPC_PARTID(part), bte_ret);
277
278 return xpc_map_bte_errors(bte_ret);
279} 275}
280 276
281/* 277/*