diff options
author | Robin Holt <holt@sgi.com> | 2009-04-13 17:40:19 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-13 18:04:33 -0400 |
commit | efdd06ed181a88a11e612238c1ac04668e665395 (patch) | |
tree | 6d66f74c82edf9986eeab5b3edef4697d5b6bb5c /drivers/misc/sgi-xp/xpc_uv.c | |
parent | a374c57b0764432a80303abee3d1afd1939b5a0a (diff) |
sgi-xpc: implement opencomplete messaging
sgi-xpc has a window of failure where an open message can be sent and a
subsequent data message can get lost. We have added a new message
(opencomplete) which closes that window.
Signed-off-by: Robin Holt <holt@sgi.com>
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.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/misc/sgi-xp/xpc_uv.c b/drivers/misc/sgi-xp/xpc_uv.c index 97f7cb21a0a2..1e475b4c0887 100644 --- a/drivers/misc/sgi-xp/xpc_uv.c +++ b/drivers/misc/sgi-xp/xpc_uv.c | |||
@@ -534,6 +534,17 @@ xpc_handle_activate_mq_msg_uv(struct xpc_partition *part, | |||
534 | xpc_wakeup_channel_mgr(part); | 534 | xpc_wakeup_channel_mgr(part); |
535 | break; | 535 | break; |
536 | } | 536 | } |
537 | case XPC_ACTIVATE_MQ_MSG_CHCTL_OPENCOMPLETE_UV: { | ||
538 | struct xpc_activate_mq_msg_chctl_opencomplete_uv *msg; | ||
539 | |||
540 | msg = container_of(msg_hdr, struct | ||
541 | xpc_activate_mq_msg_chctl_opencomplete_uv, hdr); | ||
542 | spin_lock_irqsave(&part->chctl_lock, irq_flags); | ||
543 | part->chctl.flags[msg->ch_number] |= XPC_CHCTL_OPENCOMPLETE; | ||
544 | spin_unlock_irqrestore(&part->chctl_lock, irq_flags); | ||
545 | |||
546 | xpc_wakeup_channel_mgr(part); | ||
547 | } | ||
537 | case XPC_ACTIVATE_MQ_MSG_MARK_ENGAGED_UV: | 548 | case XPC_ACTIVATE_MQ_MSG_MARK_ENGAGED_UV: |
538 | spin_lock_irqsave(&part_uv->flags_lock, irq_flags); | 549 | spin_lock_irqsave(&part_uv->flags_lock, irq_flags); |
539 | part_uv->flags |= XPC_P_ENGAGED_UV; | 550 | part_uv->flags |= XPC_P_ENGAGED_UV; |
@@ -1202,6 +1213,16 @@ xpc_send_chctl_openreply_uv(struct xpc_channel *ch, unsigned long *irq_flags) | |||
1202 | } | 1213 | } |
1203 | 1214 | ||
1204 | static void | 1215 | static void |
1216 | xpc_send_chctl_opencomplete_uv(struct xpc_channel *ch, unsigned long *irq_flags) | ||
1217 | { | ||
1218 | struct xpc_activate_mq_msg_chctl_opencomplete_uv msg; | ||
1219 | |||
1220 | msg.ch_number = ch->number; | ||
1221 | xpc_send_activate_IRQ_ch_uv(ch, irq_flags, &msg, sizeof(msg), | ||
1222 | XPC_ACTIVATE_MQ_MSG_CHCTL_OPENCOMPLETE_UV); | ||
1223 | } | ||
1224 | |||
1225 | static void | ||
1205 | xpc_send_chctl_local_msgrequest_uv(struct xpc_partition *part, int ch_number) | 1226 | xpc_send_chctl_local_msgrequest_uv(struct xpc_partition *part, int ch_number) |
1206 | { | 1227 | { |
1207 | unsigned long irq_flags; | 1228 | unsigned long irq_flags; |
@@ -1665,6 +1686,7 @@ xpc_init_uv(void) | |||
1665 | xpc_send_chctl_closereply = xpc_send_chctl_closereply_uv; | 1686 | xpc_send_chctl_closereply = xpc_send_chctl_closereply_uv; |
1666 | xpc_send_chctl_openrequest = xpc_send_chctl_openrequest_uv; | 1687 | xpc_send_chctl_openrequest = xpc_send_chctl_openrequest_uv; |
1667 | xpc_send_chctl_openreply = xpc_send_chctl_openreply_uv; | 1688 | xpc_send_chctl_openreply = xpc_send_chctl_openreply_uv; |
1689 | xpc_send_chctl_opencomplete = xpc_send_chctl_opencomplete_uv; | ||
1668 | 1690 | ||
1669 | xpc_save_remote_msgqueue_pa = xpc_save_remote_msgqueue_pa_uv; | 1691 | xpc_save_remote_msgqueue_pa = xpc_save_remote_msgqueue_pa_uv; |
1670 | 1692 | ||