aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/sgi-xp/xp_sn2.c
diff options
context:
space:
mode:
authorDean Nelson <dcn@sgi.com>2008-07-30 01:34:16 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-30 12:41:50 -0400
commit261f3b4979db88d29fc86aad9f76fbc0c2c6d21a (patch)
tree1cd1012b3ab52747a12e47f630b864d27af0bdf5 /drivers/misc/sgi-xp/xp_sn2.c
parent81fe7883d2c8a80a7145ad22f8cd8514d05412b9 (diff)
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 @@
12 * Architecture specific implementation of common functions. 12 * Architecture specific implementation of common functions.
13 */ 13 */
14 14
15#include <linux/module.h>
15#include <linux/device.h> 16#include <linux/device.h>
16#include <asm/sn/bte.h> 17#include <asm/sn/bte.h>
17#include <asm/sn/sn_sal.h> 18#include <asm/sn/sn_sal.h>
@@ -116,14 +117,23 @@ xp_remote_memcpy_sn2(void *vdst, const void *psrc, size_t len)
116 return xpBteCopyError; 117 return xpBteCopyError;
117} 118}
118 119
120static int
121xp_cpu_to_nasid_sn2(int cpuid)
122{
123 return cpuid_to_nasid(cpuid);
124}
125
119enum xp_retval 126enum xp_retval
120xp_init_sn2(void) 127xp_init_sn2(void)
121{ 128{
122 BUG_ON(!is_shub()); 129 BUG_ON(!is_shub());
123 130
124 xp_max_npartitions = XP_MAX_NPARTITIONS_SN2; 131 xp_max_npartitions = XP_MAX_NPARTITIONS_SN2;
132 xp_partition_id = sn_partition_id;
133 xp_region_size = sn_region_size;
125 134
126 xp_remote_memcpy = xp_remote_memcpy_sn2; 135 xp_remote_memcpy = xp_remote_memcpy_sn2;
136 xp_cpu_to_nasid = xp_cpu_to_nasid_sn2;
127 137
128 return xp_register_nofault_code_sn2(); 138 return xp_register_nofault_code_sn2();
129} 139}