summaryrefslogtreecommitdiff
path: root/drivers/misc/sgi-xp/xp_sn2.c
diff options
context:
space:
mode:
authorDean Nelson <dcn@sgi.com>2008-07-30 09:34:16 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-30 20:41:50 +0400
commit261f3b4979db88d29fc86aad9f76fbc0c2c6d21a (patch)
tree1cd1012b3ab52747a12e47f630b864d27af0bdf5 /drivers/misc/sgi-xp/xp_sn2.c
parent81fe7883d2c8a80a7145ad22f8cd8514d05412b9 (diff)
downloadlinux-261f3b4979db88d29fc86aad9f76fbc0c2c6d21a.tar.xz
sgi-xp: enable building of XPC/XPNET on x86_64
Get XPC/XPNET to build on x86_64. Trying to modprobe them up on a non-UV or sn2 system will result in a -ENODEV. Signed-off-by: Dean Nelson <dcn@sgi.com> Cc: Jack Steiner <steiner@sgi.com> Cc: "Luck, Tony" <tony.luck@intel.com> 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/xp_sn2.c')
-rw-r--r--drivers/misc/sgi-xp/xp_sn2.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/misc/sgi-xp/xp_sn2.c b/drivers/misc/sgi-xp/xp_sn2.c
index baabc1cb3fee..c6a1ede7d6e6 100644
--- a/drivers/misc/sgi-xp/xp_sn2.c
+++ b/drivers/misc/sgi-xp/xp_sn2.c
@@ -12,6 +12,7 @@
* Architecture specific implementation of common functions.
*/
+#include <linux/module.h>
#include <linux/device.h>
#include <asm/sn/bte.h>
#include <asm/sn/sn_sal.h>
@@ -116,14 +117,23 @@ xp_remote_memcpy_sn2(void *vdst, const void *psrc, size_t len)
return xpBteCopyError;
}
+static int
+xp_cpu_to_nasid_sn2(int cpuid)
+{
+ return cpuid_to_nasid(cpuid);
+}
+
enum xp_retval
xp_init_sn2(void)
{
BUG_ON(!is_shub());
xp_max_npartitions = XP_MAX_NPARTITIONS_SN2;
+ xp_partition_id = sn_partition_id;
+ xp_region_size = sn_region_size;
xp_remote_memcpy = xp_remote_memcpy_sn2;
+ xp_cpu_to_nasid = xp_cpu_to_nasid_sn2;
return xp_register_nofault_code_sn2();
}