diff options
author | Dean Nelson <dcn@sgi.com> | 2008-07-30 01:34:19 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-30 12:41:50 -0400 |
commit | bd3e64c1759e4930315ebf022611468ee9621486 (patch) | |
tree | 314f4f8a80788b181aa03714d952854c8e2a1866 /drivers/misc/sgi-xp/xpc_main.c | |
parent | 5b8669dfd110a62a74eea525a009342f73987ea0 (diff) |
sgi-xp: setup the notify GRU message queue
Setup the notify GRU message queue that is used for sending user messages
on UV systems.
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.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/misc/sgi-xp/xpc_main.c b/drivers/misc/sgi-xp/xpc_main.c index 13ec47928994..46325fc84811 100644 --- a/drivers/misc/sgi-xp/xpc_main.c +++ b/drivers/misc/sgi-xp/xpc_main.c | |||
@@ -188,8 +188,8 @@ u64 (*xpc_get_chctl_all_flags) (struct xpc_partition *part); | |||
188 | enum xp_retval (*xpc_setup_msg_structures) (struct xpc_channel *ch); | 188 | enum xp_retval (*xpc_setup_msg_structures) (struct xpc_channel *ch); |
189 | void (*xpc_teardown_msg_structures) (struct xpc_channel *ch); | 189 | void (*xpc_teardown_msg_structures) (struct xpc_channel *ch); |
190 | void (*xpc_process_msg_chctl_flags) (struct xpc_partition *part, int ch_number); | 190 | void (*xpc_process_msg_chctl_flags) (struct xpc_partition *part, int ch_number); |
191 | int (*xpc_n_of_deliverable_msgs) (struct xpc_channel *ch); | 191 | int (*xpc_n_of_deliverable_payloads) (struct xpc_channel *ch); |
192 | struct xpc_msg *(*xpc_get_deliverable_msg) (struct xpc_channel *ch); | 192 | void *(*xpc_get_deliverable_payload) (struct xpc_channel *ch); |
193 | 193 | ||
194 | void (*xpc_request_partition_activation) (struct xpc_rsvd_page *remote_rp, | 194 | void (*xpc_request_partition_activation) (struct xpc_rsvd_page *remote_rp, |
195 | unsigned long remote_rp_pa, | 195 | unsigned long remote_rp_pa, |
@@ -220,10 +220,11 @@ void (*xpc_send_chctl_openreply) (struct xpc_channel *ch, | |||
220 | void (*xpc_save_remote_msgqueue_pa) (struct xpc_channel *ch, | 220 | void (*xpc_save_remote_msgqueue_pa) (struct xpc_channel *ch, |
221 | unsigned long msgqueue_pa); | 221 | unsigned long msgqueue_pa); |
222 | 222 | ||
223 | enum xp_retval (*xpc_send_msg) (struct xpc_channel *ch, u32 flags, | 223 | enum xp_retval (*xpc_send_payload) (struct xpc_channel *ch, u32 flags, |
224 | void *payload, u16 payload_size, u8 notify_type, | 224 | void *payload, u16 payload_size, |
225 | xpc_notify_func func, void *key); | 225 | u8 notify_type, xpc_notify_func func, |
226 | void (*xpc_received_msg) (struct xpc_channel *ch, struct xpc_msg *msg); | 226 | void *key); |
227 | void (*xpc_received_payload) (struct xpc_channel *ch, void *payload); | ||
227 | 228 | ||
228 | /* | 229 | /* |
229 | * Timer function to enforce the timelimit on the partition disengage. | 230 | * Timer function to enforce the timelimit on the partition disengage. |
@@ -714,9 +715,9 @@ xpc_kthread_waitmsgs(struct xpc_partition *part, struct xpc_channel *ch) | |||
714 | do { | 715 | do { |
715 | /* deliver messages to their intended recipients */ | 716 | /* deliver messages to their intended recipients */ |
716 | 717 | ||
717 | while (xpc_n_of_deliverable_msgs(ch) > 0 && | 718 | while (xpc_n_of_deliverable_payloads(ch) > 0 && |
718 | !(ch->flags & XPC_C_DISCONNECTING)) { | 719 | !(ch->flags & XPC_C_DISCONNECTING)) { |
719 | xpc_deliver_msg(ch); | 720 | xpc_deliver_payload(ch); |
720 | } | 721 | } |
721 | 722 | ||
722 | if (atomic_inc_return(&ch->kthreads_idle) > | 723 | if (atomic_inc_return(&ch->kthreads_idle) > |
@@ -730,7 +731,7 @@ xpc_kthread_waitmsgs(struct xpc_partition *part, struct xpc_channel *ch) | |||
730 | "wait_event_interruptible_exclusive()\n"); | 731 | "wait_event_interruptible_exclusive()\n"); |
731 | 732 | ||
732 | (void)wait_event_interruptible_exclusive(ch->idle_wq, | 733 | (void)wait_event_interruptible_exclusive(ch->idle_wq, |
733 | (xpc_n_of_deliverable_msgs(ch) > 0 || | 734 | (xpc_n_of_deliverable_payloads(ch) > 0 || |
734 | (ch->flags & XPC_C_DISCONNECTING))); | 735 | (ch->flags & XPC_C_DISCONNECTING))); |
735 | 736 | ||
736 | atomic_dec(&ch->kthreads_idle); | 737 | atomic_dec(&ch->kthreads_idle); |
@@ -775,7 +776,7 @@ xpc_kthread_start(void *args) | |||
775 | * additional kthreads to help deliver them. We only | 776 | * additional kthreads to help deliver them. We only |
776 | * need one less than total #of messages to deliver. | 777 | * need one less than total #of messages to deliver. |
777 | */ | 778 | */ |
778 | n_needed = xpc_n_of_deliverable_msgs(ch) - 1; | 779 | n_needed = xpc_n_of_deliverable_payloads(ch) - 1; |
779 | if (n_needed > 0 && !(ch->flags & XPC_C_DISCONNECTING)) | 780 | if (n_needed > 0 && !(ch->flags & XPC_C_DISCONNECTING)) |
780 | xpc_activate_kthreads(ch, n_needed); | 781 | xpc_activate_kthreads(ch, n_needed); |
781 | 782 | ||