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.h | |
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.h')
-rw-r--r-- | drivers/misc/sgi-xp/xpc.h | 56 |
1 files changed, 34 insertions, 22 deletions
diff --git a/drivers/misc/sgi-xp/xpc.h b/drivers/misc/sgi-xp/xpc.h index da32bbe8caaf..a54047674785 100644 --- a/drivers/misc/sgi-xp/xpc.h +++ b/drivers/misc/sgi-xp/xpc.h | |||
@@ -232,9 +232,10 @@ struct xpc_activate_mq_msghdr_uv { | |||
232 | #define XPC_ACTIVATE_MQ_MSG_CHCTL_CLOSEREPLY_UV 4 | 232 | #define XPC_ACTIVATE_MQ_MSG_CHCTL_CLOSEREPLY_UV 4 |
233 | #define XPC_ACTIVATE_MQ_MSG_CHCTL_OPENREQUEST_UV 5 | 233 | #define XPC_ACTIVATE_MQ_MSG_CHCTL_OPENREQUEST_UV 5 |
234 | #define XPC_ACTIVATE_MQ_MSG_CHCTL_OPENREPLY_UV 6 | 234 | #define XPC_ACTIVATE_MQ_MSG_CHCTL_OPENREPLY_UV 6 |
235 | #define XPC_ACTIVATE_MQ_MSG_CHCTL_OPENCOMPLETE_UV 7 | ||
235 | 236 | ||
236 | #define XPC_ACTIVATE_MQ_MSG_MARK_ENGAGED_UV 7 | 237 | #define XPC_ACTIVATE_MQ_MSG_MARK_ENGAGED_UV 8 |
237 | #define XPC_ACTIVATE_MQ_MSG_MARK_DISENGAGED_UV 8 | 238 | #define XPC_ACTIVATE_MQ_MSG_MARK_DISENGAGED_UV 9 |
238 | 239 | ||
239 | struct xpc_activate_mq_msg_uv { | 240 | struct xpc_activate_mq_msg_uv { |
240 | struct xpc_activate_mq_msghdr_uv hdr; | 241 | struct xpc_activate_mq_msghdr_uv hdr; |
@@ -278,6 +279,11 @@ struct xpc_activate_mq_msg_chctl_openreply_uv { | |||
278 | unsigned long notify_gru_mq_desc_gpa; | 279 | unsigned long notify_gru_mq_desc_gpa; |
279 | }; | 280 | }; |
280 | 281 | ||
282 | struct xpc_activate_mq_msg_chctl_opencomplete_uv { | ||
283 | struct xpc_activate_mq_msghdr_uv hdr; | ||
284 | short ch_number; | ||
285 | }; | ||
286 | |||
281 | /* | 287 | /* |
282 | * Functions registered by add_timer() or called by kernel_thread() only | 288 | * Functions registered by add_timer() or called by kernel_thread() only |
283 | * allow for a single 64-bit argument. The following macros can be used to | 289 | * allow for a single 64-bit argument. The following macros can be used to |
@@ -583,30 +589,32 @@ struct xpc_channel { | |||
583 | 589 | ||
584 | #define XPC_C_WASCONNECTED 0x00000001 /* channel was connected */ | 590 | #define XPC_C_WASCONNECTED 0x00000001 /* channel was connected */ |
585 | 591 | ||
586 | #define XPC_C_ROPENREPLY 0x00000002 /* remote open channel reply */ | 592 | #define XPC_C_ROPENCOMPLETE 0x00000002 /* remote open channel complete */ |
587 | #define XPC_C_OPENREPLY 0x00000004 /* local open channel reply */ | 593 | #define XPC_C_OPENCOMPLETE 0x00000004 /* local open channel complete */ |
588 | #define XPC_C_ROPENREQUEST 0x00000008 /* remote open channel request */ | 594 | #define XPC_C_ROPENREPLY 0x00000008 /* remote open channel reply */ |
589 | #define XPC_C_OPENREQUEST 0x00000010 /* local open channel request */ | 595 | #define XPC_C_OPENREPLY 0x00000010 /* local open channel reply */ |
596 | #define XPC_C_ROPENREQUEST 0x00000020 /* remote open channel request */ | ||
597 | #define XPC_C_OPENREQUEST 0x00000040 /* local open channel request */ | ||
590 | 598 | ||
591 | #define XPC_C_SETUP 0x00000020 /* channel's msgqueues are alloc'd */ | 599 | #define XPC_C_SETUP 0x00000080 /* channel's msgqueues are alloc'd */ |
592 | #define XPC_C_CONNECTEDCALLOUT 0x00000040 /* connected callout initiated */ | 600 | #define XPC_C_CONNECTEDCALLOUT 0x00000100 /* connected callout initiated */ |
593 | #define XPC_C_CONNECTEDCALLOUT_MADE \ | 601 | #define XPC_C_CONNECTEDCALLOUT_MADE \ |
594 | 0x00000080 /* connected callout completed */ | 602 | 0x00000200 /* connected callout completed */ |
595 | #define XPC_C_CONNECTED 0x00000100 /* local channel is connected */ | 603 | #define XPC_C_CONNECTED 0x00000400 /* local channel is connected */ |
596 | #define XPC_C_CONNECTING 0x00000200 /* channel is being connected */ | 604 | #define XPC_C_CONNECTING 0x00000800 /* channel is being connected */ |
597 | 605 | ||
598 | #define XPC_C_RCLOSEREPLY 0x00000400 /* remote close channel reply */ | 606 | #define XPC_C_RCLOSEREPLY 0x00001000 /* remote close channel reply */ |
599 | #define XPC_C_CLOSEREPLY 0x00000800 /* local close channel reply */ | 607 | #define XPC_C_CLOSEREPLY 0x00002000 /* local close channel reply */ |
600 | #define XPC_C_RCLOSEREQUEST 0x00001000 /* remote close channel request */ | 608 | #define XPC_C_RCLOSEREQUEST 0x00004000 /* remote close channel request */ |
601 | #define XPC_C_CLOSEREQUEST 0x00002000 /* local close channel request */ | 609 | #define XPC_C_CLOSEREQUEST 0x00008000 /* local close channel request */ |
602 | 610 | ||
603 | #define XPC_C_DISCONNECTED 0x00004000 /* channel is disconnected */ | 611 | #define XPC_C_DISCONNECTED 0x00010000 /* channel is disconnected */ |
604 | #define XPC_C_DISCONNECTING 0x00008000 /* channel is being disconnected */ | 612 | #define XPC_C_DISCONNECTING 0x00020000 /* channel is being disconnected */ |
605 | #define XPC_C_DISCONNECTINGCALLOUT \ | 613 | #define XPC_C_DISCONNECTINGCALLOUT \ |
606 | 0x00010000 /* disconnecting callout initiated */ | 614 | 0x00040000 /* disconnecting callout initiated */ |
607 | #define XPC_C_DISCONNECTINGCALLOUT_MADE \ | 615 | #define XPC_C_DISCONNECTINGCALLOUT_MADE \ |
608 | 0x00020000 /* disconnecting callout completed */ | 616 | 0x00080000 /* disconnecting callout completed */ |
609 | #define XPC_C_WDISCONNECT 0x00040000 /* waiting for channel disconnect */ | 617 | #define XPC_C_WDISCONNECT 0x00100000 /* waiting for channel disconnect */ |
610 | 618 | ||
611 | /* | 619 | /* |
612 | * The channel control flags (chctl) union consists of a 64-bit variable which | 620 | * The channel control flags (chctl) union consists of a 64-bit variable which |
@@ -625,11 +633,13 @@ union xpc_channel_ctl_flags { | |||
625 | #define XPC_CHCTL_CLOSEREPLY 0x02 | 633 | #define XPC_CHCTL_CLOSEREPLY 0x02 |
626 | #define XPC_CHCTL_OPENREQUEST 0x04 | 634 | #define XPC_CHCTL_OPENREQUEST 0x04 |
627 | #define XPC_CHCTL_OPENREPLY 0x08 | 635 | #define XPC_CHCTL_OPENREPLY 0x08 |
628 | #define XPC_CHCTL_MSGREQUEST 0x10 | 636 | #define XPC_CHCTL_OPENCOMPLETE 0x10 |
637 | #define XPC_CHCTL_MSGREQUEST 0x20 | ||
629 | 638 | ||
630 | #define XPC_OPENCLOSE_CHCTL_FLAGS \ | 639 | #define XPC_OPENCLOSE_CHCTL_FLAGS \ |
631 | (XPC_CHCTL_CLOSEREQUEST | XPC_CHCTL_CLOSEREPLY | \ | 640 | (XPC_CHCTL_CLOSEREQUEST | XPC_CHCTL_CLOSEREPLY | \ |
632 | XPC_CHCTL_OPENREQUEST | XPC_CHCTL_OPENREPLY) | 641 | XPC_CHCTL_OPENREQUEST | XPC_CHCTL_OPENREPLY | \ |
642 | XPC_CHCTL_OPENCOMPLETE) | ||
633 | #define XPC_MSG_CHCTL_FLAGS XPC_CHCTL_MSGREQUEST | 643 | #define XPC_MSG_CHCTL_FLAGS XPC_CHCTL_MSGREQUEST |
634 | 644 | ||
635 | static inline int | 645 | static inline int |
@@ -866,6 +876,8 @@ extern void (*xpc_send_chctl_closereply) (struct xpc_channel *, | |||
866 | extern void (*xpc_send_chctl_openrequest) (struct xpc_channel *, | 876 | extern void (*xpc_send_chctl_openrequest) (struct xpc_channel *, |
867 | unsigned long *); | 877 | unsigned long *); |
868 | extern void (*xpc_send_chctl_openreply) (struct xpc_channel *, unsigned long *); | 878 | extern void (*xpc_send_chctl_openreply) (struct xpc_channel *, unsigned long *); |
879 | extern void (*xpc_send_chctl_opencomplete) (struct xpc_channel *, | ||
880 | unsigned long *); | ||
869 | 881 | ||
870 | extern enum xp_retval (*xpc_save_remote_msgqueue_pa) (struct xpc_channel *, | 882 | extern enum xp_retval (*xpc_save_remote_msgqueue_pa) (struct xpc_channel *, |
871 | unsigned long); | 883 | unsigned long); |