aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/sgi-xp/xpc_main.c
diff options
context:
space:
mode:
authorDean Nelson <dcn@sgi.com>2008-07-30 01:34:17 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-30 12:41:50 -0400
commit61deb86e98f51151b225f7563ee1cf2b50857d10 (patch)
tree0196f0748fed77b100476067ca31254517e939b1 /drivers/misc/sgi-xp/xpc_main.c
parenta812dcc3a298eef650c381e094e2cf41a4ecc9ad (diff)
sgi-xp: move xpc_check_remote_hb() to support both SN2 and UV
Move xpc_check_remote_hb() so it can support both SN2 and UV. 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/xpc_main.c')
-rw-r--r--drivers/misc/sgi-xp/xpc_main.c34
1 files changed, 33 insertions, 1 deletions
diff --git a/drivers/misc/sgi-xp/xpc_main.c b/drivers/misc/sgi-xp/xpc_main.c
index dc686110aef7..f4d866113f2a 100644
--- a/drivers/misc/sgi-xp/xpc_main.c
+++ b/drivers/misc/sgi-xp/xpc_main.c
@@ -178,7 +178,7 @@ void (*xpc_heartbeat_exit) (void);
178void (*xpc_increment_heartbeat) (void); 178void (*xpc_increment_heartbeat) (void);
179void (*xpc_offline_heartbeat) (void); 179void (*xpc_offline_heartbeat) (void);
180void (*xpc_online_heartbeat) (void); 180void (*xpc_online_heartbeat) (void);
181void (*xpc_check_remote_hb) (void); 181enum xp_retval (*xpc_get_remote_heartbeat) (struct xpc_partition *part);
182 182
183enum xp_retval (*xpc_make_first_contact) (struct xpc_partition *part); 183enum xp_retval (*xpc_make_first_contact) (struct xpc_partition *part);
184void (*xpc_notify_senders_of_disconnect) (struct xpc_channel *ch); 184void (*xpc_notify_senders_of_disconnect) (struct xpc_channel *ch);
@@ -270,6 +270,38 @@ xpc_stop_hb_beater(void)
270} 270}
271 271
272/* 272/*
273 * At periodic intervals, scan through all active partitions and ensure
274 * their heartbeat is still active. If not, the partition is deactivated.
275 */
276static void
277xpc_check_remote_hb(void)
278{
279 struct xpc_partition *part;
280 short partid;
281 enum xp_retval ret;
282
283 for (partid = 0; partid < xp_max_npartitions; partid++) {
284
285 if (xpc_exiting)
286 break;
287
288 if (partid == xp_partition_id)
289 continue;
290
291 part = &xpc_partitions[partid];
292
293 if (part->act_state == XPC_P_INACTIVE ||
294 part->act_state == XPC_P_DEACTIVATING) {
295 continue;
296 }
297
298 ret = xpc_get_remote_heartbeat(part);
299 if (ret != xpSuccess)
300 XPC_DEACTIVATE_PARTITION(part, ret);
301 }
302}
303
304/*
273 * This thread is responsible for nearly all of the partition 305 * This thread is responsible for nearly all of the partition
274 * activation/deactivation. 306 * activation/deactivation.
275 */ 307 */