summaryrefslogtreecommitdiffstats
path: root/drivers/misc/sgi-xp/xpc_uv.c
diff options
context:
space:
mode:
authorDean Nelson <dcn@sgi.com>2008-07-29 22:34:07 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-30 09:41:49 -0700
commit33ba3c7724be79f7cdbfc611335572c056d9a05a (patch)
treedb0371c031b0bbab13ccb2aeaf015424633cf2d8 /drivers/misc/sgi-xp/xpc_uv.c
parente17d416b1bc947df68499863f13b401fb42b48f6 (diff)
downloadop-kernel-dev-33ba3c7724be79f7cdbfc611335572c056d9a05a.zip
op-kernel-dev-33ba3c7724be79f7cdbfc611335572c056d9a05a.tar.gz
sgi-xp: isolate xpc_vars structure to sn2 only
Isolate the xpc_vars structure of XPC's reserved page to sn2 only. 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>
Diffstat (limited to 'drivers/misc/sgi-xp/xpc_uv.c')
-rw-r--r--drivers/misc/sgi-xp/xpc_uv.c57
1 files changed, 52 insertions, 5 deletions
diff --git a/drivers/misc/sgi-xp/xpc_uv.c b/drivers/misc/sgi-xp/xpc_uv.c
index 770f0a8..32c577b 100644
--- a/drivers/misc/sgi-xp/xpc_uv.c
+++ b/drivers/misc/sgi-xp/xpc_uv.c
@@ -19,15 +19,22 @@
/* >>> uv_gpa() is defined in <gru/grukservices.h> */
#define uv_gpa(_a) ((unsigned long)_a)
-/* >>> temporarily define next three items for xpc.h */
-#define SGI_XPC_ACTIVATE 23
-#define SGI_XPC_NOTIFY 24
-#define sn_send_IPI_phys(_a, _b, _c, _d)
-
#include "xpc.h"
+static DECLARE_BITMAP(xpc_heartbeating_to_mask_uv, XP_MAX_NPARTITIONS_UV);
+
static void *xpc_activate_mq;
+static void
+xpc_IPI_send_local_activate_uv(struct xpc_partition *part)
+{
+ /*
+ * >>> make our side think that the remote parition sent an activate
+ * >>> message our way. Also do what the activate IRQ handler would
+ * >>> do had one really been sent.
+ */
+}
+
static enum xp_retval
xpc_rsvd_page_init_uv(struct xpc_rsvd_page *rp)
{
@@ -36,6 +43,41 @@ xpc_rsvd_page_init_uv(struct xpc_rsvd_page *rp)
return xpSuccess;
}
+static void
+xpc_increment_heartbeat_uv(void)
+{
+ /* >>> send heartbeat msg to xpc_heartbeating_to_mask partids */
+}
+
+static void
+xpc_heartbeat_init_uv(void)
+{
+ bitmap_zero(xpc_heartbeating_to_mask_uv, XP_MAX_NPARTITIONS_UV);
+ xpc_heartbeating_to_mask = &xpc_heartbeating_to_mask_uv[0];
+}
+
+static void
+xpc_heartbeat_exit_uv(void)
+{
+ /* >>> send heartbeat_offline msg to xpc_heartbeating_to_mask partids */
+}
+
+static void
+xpc_initiate_partition_activation_uv(struct xpc_rsvd_page *remote_rp,
+ u64 remote_rp_pa, int nasid)
+{
+ short partid = remote_rp->SAL_partid;
+ struct xpc_partition *part = &xpc_partitions[partid];
+
+/*
+ * >>> setup part structure with the bits of info we can glean from the rp
+ * >>> part->remote_rp_pa = remote_rp_pa;
+ * >>> part->sn.uv.activate_mq_gpa = remote_rp->sn.activate_mq_gpa;
+ */
+
+ xpc_IPI_send_local_activate_uv(part);
+}
+
/*
* Setup the infrastructure necessary to support XPartition Communication
* between the specified remote partition and the local one.
@@ -83,6 +125,11 @@ void
xpc_init_uv(void)
{
xpc_rsvd_page_init = xpc_rsvd_page_init_uv;
+ xpc_increment_heartbeat = xpc_increment_heartbeat_uv;
+ xpc_heartbeat_init = xpc_heartbeat_init_uv;
+ xpc_heartbeat_exit = xpc_heartbeat_exit_uv;
+ xpc_initiate_partition_activation =
+ xpc_initiate_partition_activation_uv;
xpc_setup_infrastructure = xpc_setup_infrastructure_uv;
xpc_teardown_infrastructure = xpc_teardown_infrastructure_uv;
xpc_make_first_contact = xpc_make_first_contact_uv;
OpenPOWER on IntegriCloud