aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/sgi-xp/xpc_uv.c
diff options
context:
space:
mode:
authorDean Nelson <dcn@sgi.com>2008-07-30 01:34:07 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-30 12:41:49 -0400
commit33ba3c7724be79f7cdbfc611335572c056d9a05a (patch)
treedb0371c031b0bbab13ccb2aeaf015424633cf2d8 /drivers/misc/sgi-xp/xpc_uv.c
parente17d416b1bc947df68499863f13b401fb42b48f6 (diff)
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 770f0a8c669e..32c577b8d0df 100644
--- a/drivers/misc/sgi-xp/xpc_uv.c
+++ b/drivers/misc/sgi-xp/xpc_uv.c
@@ -19,15 +19,22 @@
19/* >>> uv_gpa() is defined in <gru/grukservices.h> */ 19/* >>> uv_gpa() is defined in <gru/grukservices.h> */
20#define uv_gpa(_a) ((unsigned long)_a) 20#define uv_gpa(_a) ((unsigned long)_a)
21 21
22/* >>> temporarily define next three items for xpc.h */
23#define SGI_XPC_ACTIVATE 23
24#define SGI_XPC_NOTIFY 24
25#define sn_send_IPI_phys(_a, _b, _c, _d)
26
27#include "xpc.h" 22#include "xpc.h"
28 23
24static DECLARE_BITMAP(xpc_heartbeating_to_mask_uv, XP_MAX_NPARTITIONS_UV);
25
29static void *xpc_activate_mq; 26static void *xpc_activate_mq;
30 27
28static void
29xpc_IPI_send_local_activate_uv(struct xpc_partition *part)
30{
31 /*
32 * >>> make our side think that the remote parition sent an activate
33 * >>> message our way. Also do what the activate IRQ handler would
34 * >>> do had one really been sent.
35 */
36}
37
31static enum xp_retval 38static enum xp_retval
32xpc_rsvd_page_init_uv(struct xpc_rsvd_page *rp) 39xpc_rsvd_page_init_uv(struct xpc_rsvd_page *rp)
33{ 40{
@@ -36,6 +43,41 @@ xpc_rsvd_page_init_uv(struct xpc_rsvd_page *rp)
36 return xpSuccess; 43 return xpSuccess;
37} 44}
38 45
46static void
47xpc_increment_heartbeat_uv(void)
48{
49 /* >>> send heartbeat msg to xpc_heartbeating_to_mask partids */
50}
51
52static void
53xpc_heartbeat_init_uv(void)
54{
55 bitmap_zero(xpc_heartbeating_to_mask_uv, XP_MAX_NPARTITIONS_UV);
56 xpc_heartbeating_to_mask = &xpc_heartbeating_to_mask_uv[0];
57}
58
59static void
60xpc_heartbeat_exit_uv(void)
61{
62 /* >>> send heartbeat_offline msg to xpc_heartbeating_to_mask partids */
63}
64
65static void
66xpc_initiate_partition_activation_uv(struct xpc_rsvd_page *remote_rp,
67 u64 remote_rp_pa, int nasid)
68{
69 short partid = remote_rp->SAL_partid;
70 struct xpc_partition *part = &xpc_partitions[partid];
71
72/*
73 * >>> setup part structure with the bits of info we can glean from the rp
74 * >>> part->remote_rp_pa = remote_rp_pa;
75 * >>> part->sn.uv.activate_mq_gpa = remote_rp->sn.activate_mq_gpa;
76 */
77
78 xpc_IPI_send_local_activate_uv(part);
79}
80
39/* 81/*
40 * Setup the infrastructure necessary to support XPartition Communication 82 * Setup the infrastructure necessary to support XPartition Communication
41 * between the specified remote partition and the local one. 83 * between the specified remote partition and the local one.
@@ -83,6 +125,11 @@ void
83xpc_init_uv(void) 125xpc_init_uv(void)
84{ 126{
85 xpc_rsvd_page_init = xpc_rsvd_page_init_uv; 127 xpc_rsvd_page_init = xpc_rsvd_page_init_uv;
128 xpc_increment_heartbeat = xpc_increment_heartbeat_uv;
129 xpc_heartbeat_init = xpc_heartbeat_init_uv;
130 xpc_heartbeat_exit = xpc_heartbeat_exit_uv;
131 xpc_initiate_partition_activation =
132 xpc_initiate_partition_activation_uv;
86 xpc_setup_infrastructure = xpc_setup_infrastructure_uv; 133 xpc_setup_infrastructure = xpc_setup_infrastructure_uv;
87 xpc_teardown_infrastructure = xpc_teardown_infrastructure_uv; 134 xpc_teardown_infrastructure = xpc_teardown_infrastructure_uv;
88 xpc_make_first_contact = xpc_make_first_contact_uv; 135 xpc_make_first_contact = xpc_make_first_contact_uv;