sgi-xp: isolate remote copy buffer to sn2 only

Make the remote copy buffer an sn2 only item.

Signed-off-by: Dean Nelson <dcn@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
diff --git a/drivers/misc/sgi-xp/xpc_partition.c b/drivers/misc/sgi-xp/xpc_partition.c
index c769ab8..9f10445 100644
--- a/drivers/misc/sgi-xp/xpc_partition.c
+++ b/drivers/misc/sgi-xp/xpc_partition.c
@@ -34,21 +34,12 @@
 static u64 *xpc_part_nasids;
 u64 *xpc_mach_nasids;
 
-/* >>> next two variables should be 'xpc_' if they remain here */
-static int xp_sizeof_nasid_mask;	/* actual size in bytes of nasid mask */
-int xp_nasid_mask_words;	/* actual size in words of nasid mask */
+static int xpc_sizeof_nasid_mask;	/* actual size in bytes of nasid mask */
+int xpc_nasid_mask_words;	/* actual size in words of nasid mask */
 
 struct xpc_partition *xpc_partitions;
 
 /*
- * Generic buffer used to store a local copy of portions of a remote
- * partition's reserved page (either its header and part_nasids mask,
- * or its vars).
- */
-char *xpc_remote_copy_buffer;
-void *xpc_remote_copy_buffer_base;
-
-/*
  * Guarantee that the kmalloc'd memory is cacheline aligned.
  */
 void *
@@ -176,9 +167,9 @@
 		/* SAL_version 1 didn't set the nasids_size field */
 		rp->SAL_nasids_size = 128;
 	}
-	xp_sizeof_nasid_mask = rp->SAL_nasids_size;
-	xp_nasid_mask_words = DIV_ROUND_UP(xp_sizeof_nasid_mask,
-					   BYTES_PER_WORD);
+	xpc_sizeof_nasid_mask = rp->SAL_nasids_size;
+	xpc_nasid_mask_words = DIV_ROUND_UP(xpc_sizeof_nasid_mask,
+					    BYTES_PER_WORD);
 
 	/* setup the pointers to the various items in the reserved page */
 	xpc_part_nasids = XPC_RP_PART_NASIDS(rp);
@@ -222,14 +213,14 @@
 
 	/* pull over the reserved page header and part_nasids mask */
 	ret = xp_remote_memcpy(remote_rp, (void *)*remote_rp_pa,
-			       XPC_RP_HEADER_SIZE + xp_sizeof_nasid_mask);
+			       XPC_RP_HEADER_SIZE + xpc_sizeof_nasid_mask);
 	if (ret != xpSuccess)
 		return ret;
 
 	if (discovered_nasids != NULL) {
 		u64 *remote_part_nasids = XPC_RP_PART_NASIDS(remote_rp);
 
-		for (i = 0; i < xp_nasid_mask_words; i++)
+		for (i = 0; i < xpc_nasid_mask_words; i++)
 			discovered_nasids[i] |= remote_part_nasids[i];
 	}
 
@@ -414,12 +405,12 @@
 	enum xp_retval ret;
 
 	remote_rp = xpc_kmalloc_cacheline_aligned(XPC_RP_HEADER_SIZE +
-						  xp_sizeof_nasid_mask,
+						  xpc_sizeof_nasid_mask,
 						  GFP_KERNEL, &remote_rp_base);
 	if (remote_rp == NULL)
 		return;
 
-	discovered_nasids = kzalloc(sizeof(u64) * xp_nasid_mask_words,
+	discovered_nasids = kzalloc(sizeof(u64) * xpc_nasid_mask_words,
 				    GFP_KERNEL);
 	if (discovered_nasids == NULL) {
 		kfree(remote_rp_base);
@@ -521,10 +512,10 @@
 	if (part->remote_rp_pa == 0)
 		return xpPartitionDown;
 
-	memset(nasid_mask, 0, XP_NASID_MASK_BYTES);
+	memset(nasid_mask, 0, xpc_sizeof_nasid_mask);
 
 	part_nasid_pa = (u64)XPC_RP_PART_NASIDS(part->remote_rp_pa);
 
 	return xp_remote_memcpy(nasid_mask, (void *)part_nasid_pa,
-				xp_sizeof_nasid_mask);
+				xpc_sizeof_nasid_mask);
 }