summaryrefslogtreecommitdiffstats
path: root/drivers/misc/sgi-xp/xp.h
diff options
context:
space:
mode:
authorDean Nelson <dcn@sgi.com>2008-07-29 22:34:16 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-30 09:41:50 -0700
commit261f3b4979db88d29fc86aad9f76fbc0c2c6d21a (patch)
tree1cd1012b3ab52747a12e47f630b864d27af0bdf5 /drivers/misc/sgi-xp/xp.h
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.h')
-rw-r--r--drivers/misc/sgi-xp/xp.h32
1 files changed, 21 insertions, 11 deletions
diff --git a/drivers/misc/sgi-xp/xp.h b/drivers/misc/sgi-xp/xp.h
index 3054fae8b02..01bf1a2cd8e 100644
--- a/drivers/misc/sgi-xp/xp.h
+++ b/drivers/misc/sgi-xp/xp.h
@@ -13,18 +13,17 @@
#ifndef _DRIVERS_MISC_SGIXP_XP_H
#define _DRIVERS_MISC_SGIXP_XP_H
-#include <linux/cache.h>
-#include <linux/hardirq.h>
#include <linux/mutex.h>
-#include <asm/sn/types.h>
+
#ifdef CONFIG_IA64
-#include <asm/sn/arch.h>
+#include <asm/system.h>
+#include <asm/sn/arch.h> /* defines is_shub1() and is_shub2() */
+#define is_shub() ia64_platform_is("sn2")
+#define is_uv() ia64_platform_is("uv")
#endif
-
-#ifdef USE_DBUG_ON
-#define DBUG_ON(condition) BUG_ON(condition)
-#else
-#define DBUG_ON(condition)
+#ifdef CONFIG_X86_64
+#include <asm/genapic.h>
+#define is_uv() is_uv_system()
#endif
#ifndef is_shub1
@@ -36,13 +35,19 @@
#endif
#ifndef is_shub
-#define is_shub() (is_shub1() || is_shub2())
+#define is_shub() 0
#endif
#ifndef is_uv
#define is_uv() 0
#endif
+#ifdef USE_DBUG_ON
+#define DBUG_ON(condition) BUG_ON(condition)
+#else
+#define DBUG_ON(condition)
+#endif
+
/*
* Define the maximum number of partitions the system can possibly support.
* It is based on the maximum number of hardware partitionable regions. The
@@ -200,7 +205,9 @@ enum xp_retval {
xpPayloadTooBig, /* 55: payload too large for message slot */
xpUnsupported, /* 56: unsupported functionality or resource */
- xpUnknownReason /* 57: unknown reason - must be last in enum */
+ xpNeedMoreInfo, /* 57: more info is needed by SAL */
+
+ xpUnknownReason /* 58: unknown reason - must be last in enum */
};
/*
@@ -339,8 +346,11 @@ xpc_partid_to_nasids(short partid, void *nasids)
}
extern short xp_max_npartitions;
+extern short xp_partition_id;
+extern u8 xp_region_size;
extern enum xp_retval (*xp_remote_memcpy) (void *, const void *, size_t);
+extern int (*xp_cpu_to_nasid) (int);
extern u64 xp_nofault_PIOR_target;
extern int xp_nofault_PIOR(void *);