diff options
author | Dean Nelson <dcn@sgi.com> | 2005-10-25 15:07:43 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2005-10-25 19:27:37 -0400 |
commit | e54af724c1ae3530c95135157776c9be65cdb747 (patch) | |
tree | 99623edaf5d8fb34c8b43cbd19cf3d7b47d8b8f8 /arch/ia64/sn/kernel/xpc.h | |
parent | a607c38971fd078865fa9bef39e6c1d4435680c8 (diff) |
[IA64-SGI] fixes for XPC disengage and open/close protocol
This patch addresses a few issues with the open/close protocol that
were revealed by the newly added disengage functionality combined
with more extensive testing.
Signed-off-by: Dean Nelson <dcn@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64/sn/kernel/xpc.h')
-rw-r--r-- | arch/ia64/sn/kernel/xpc.h | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/arch/ia64/sn/kernel/xpc.h b/arch/ia64/sn/kernel/xpc.h index 565822ab3d08..ae51d7b4c42e 100644 --- a/arch/ia64/sn/kernel/xpc.h +++ b/arch/ia64/sn/kernel/xpc.h | |||
@@ -417,6 +417,9 @@ struct xpc_channel { | |||
417 | atomic_t n_on_msg_allocate_wq; /* #on msg allocation wait queue */ | 417 | atomic_t n_on_msg_allocate_wq; /* #on msg allocation wait queue */ |
418 | wait_queue_head_t msg_allocate_wq; /* msg allocation wait queue */ | 418 | wait_queue_head_t msg_allocate_wq; /* msg allocation wait queue */ |
419 | 419 | ||
420 | u8 delayed_IPI_flags; /* IPI flags received, but delayed */ | ||
421 | /* action until channel disconnected */ | ||
422 | |||
420 | /* queue of msg senders who want to be notified when msg received */ | 423 | /* queue of msg senders who want to be notified when msg received */ |
421 | 424 | ||
422 | atomic_t n_to_notify; /* #of msg senders to notify */ | 425 | atomic_t n_to_notify; /* #of msg senders to notify */ |
@@ -478,7 +481,8 @@ struct xpc_channel { | |||
478 | 481 | ||
479 | #define XPC_C_DISCONNECTED 0x00002000 /* channel is disconnected */ | 482 | #define XPC_C_DISCONNECTED 0x00002000 /* channel is disconnected */ |
480 | #define XPC_C_DISCONNECTING 0x00004000 /* channel is being disconnected */ | 483 | #define XPC_C_DISCONNECTING 0x00004000 /* channel is being disconnected */ |
481 | #define XPC_C_WDISCONNECT 0x00008000 /* waiting for channel disconnect */ | 484 | #define XPC_C_DISCONNECTCALLOUT 0x00008000 /* chan disconnected callout made */ |
485 | #define XPC_C_WDISCONNECT 0x00010000 /* waiting for channel disconnect */ | ||
482 | 486 | ||
483 | 487 | ||
484 | 488 | ||
@@ -508,13 +512,13 @@ struct xpc_partition { | |||
508 | int reason_line; /* line# deactivation initiated from */ | 512 | int reason_line; /* line# deactivation initiated from */ |
509 | int reactivate_nasid; /* nasid in partition to reactivate */ | 513 | int reactivate_nasid; /* nasid in partition to reactivate */ |
510 | 514 | ||
511 | unsigned long disengage_request_timeout; /* timeout in XPC_TICKS */ | 515 | unsigned long disengage_request_timeout; /* timeout in jiffies */ |
512 | struct timer_list disengage_request_timer; | 516 | struct timer_list disengage_request_timer; |
513 | 517 | ||
514 | 518 | ||
515 | /* XPC infrastructure referencing and teardown control */ | 519 | /* XPC infrastructure referencing and teardown control */ |
516 | 520 | ||
517 | volatile u8 setup_state; /* infrastructure setup state */ | 521 | volatile u8 setup_state; /* infrastructure setup state */ |
518 | wait_queue_head_t teardown_wq; /* kthread waiting to teardown infra */ | 522 | wait_queue_head_t teardown_wq; /* kthread waiting to teardown infra */ |
519 | atomic_t references; /* #of references to infrastructure */ | 523 | atomic_t references; /* #of references to infrastructure */ |
520 | 524 | ||
@@ -604,7 +608,7 @@ struct xpc_partition { | |||
604 | 608 | ||
605 | 609 | ||
606 | /* number of seconds to wait for other partitions to disengage */ | 610 | /* number of seconds to wait for other partitions to disengage */ |
607 | #define XPC_DISENGAGE_REQUEST_TIMELIMIT 90 | 611 | #define XPC_DISENGAGE_REQUEST_DEFAULT_TIMELIMIT 90 |
608 | 612 | ||
609 | /* interval in seconds to print 'waiting disengagement' messages */ | 613 | /* interval in seconds to print 'waiting disengagement' messages */ |
610 | #define XPC_DISENGAGE_PRINTMSG_INTERVAL 10 | 614 | #define XPC_DISENGAGE_PRINTMSG_INTERVAL 10 |
@@ -618,20 +622,18 @@ struct xpc_partition { | |||
618 | extern struct xpc_registration xpc_registrations[]; | 622 | extern struct xpc_registration xpc_registrations[]; |
619 | 623 | ||
620 | 624 | ||
621 | /* >>> found in xpc_main.c only */ | 625 | /* found in xpc_main.c */ |
622 | extern struct device *xpc_part; | 626 | extern struct device *xpc_part; |
623 | extern struct device *xpc_chan; | 627 | extern struct device *xpc_chan; |
628 | extern int xpc_disengage_request_timelimit; | ||
624 | extern irqreturn_t xpc_notify_IRQ_handler(int, void *, struct pt_regs *); | 629 | extern irqreturn_t xpc_notify_IRQ_handler(int, void *, struct pt_regs *); |
625 | extern void xpc_dropped_IPI_check(struct xpc_partition *); | 630 | extern void xpc_dropped_IPI_check(struct xpc_partition *); |
631 | extern void xpc_activate_partition(struct xpc_partition *); | ||
626 | extern void xpc_activate_kthreads(struct xpc_channel *, int); | 632 | extern void xpc_activate_kthreads(struct xpc_channel *, int); |
627 | extern void xpc_create_kthreads(struct xpc_channel *, int); | 633 | extern void xpc_create_kthreads(struct xpc_channel *, int); |
628 | extern void xpc_disconnect_wait(int); | 634 | extern void xpc_disconnect_wait(int); |
629 | 635 | ||
630 | 636 | ||
631 | /* found in xpc_main.c and efi-xpc.c */ | ||
632 | extern void xpc_activate_partition(struct xpc_partition *); | ||
633 | |||
634 | |||
635 | /* found in xpc_partition.c */ | 637 | /* found in xpc_partition.c */ |
636 | extern int xpc_exiting; | 638 | extern int xpc_exiting; |
637 | extern struct xpc_vars *xpc_vars; | 639 | extern struct xpc_vars *xpc_vars; |
@@ -1077,6 +1079,7 @@ xpc_notify_IRQ_send_local(struct xpc_channel *ch, u8 ipi_flag, | |||
1077 | 1079 | ||
1078 | /* given an AMO variable and a channel#, get its associated IPI flags */ | 1080 | /* given an AMO variable and a channel#, get its associated IPI flags */ |
1079 | #define XPC_GET_IPI_FLAGS(_amo, _c) ((u8) (((_amo) >> ((_c) * 8)) & 0xff)) | 1081 | #define XPC_GET_IPI_FLAGS(_amo, _c) ((u8) (((_amo) >> ((_c) * 8)) & 0xff)) |
1082 | #define XPC_SET_IPI_FLAGS(_amo, _c, _f) (_amo) |= ((u64) (_f) << ((_c) * 8)) | ||
1080 | 1083 | ||
1081 | #define XPC_ANY_OPENCLOSE_IPI_FLAGS_SET(_amo) ((_amo) & 0x0f0f0f0f0f0f0f0f) | 1084 | #define XPC_ANY_OPENCLOSE_IPI_FLAGS_SET(_amo) ((_amo) & 0x0f0f0f0f0f0f0f0f) |
1082 | #define XPC_ANY_MSG_IPI_FLAGS_SET(_amo) ((_amo) & 0x1010101010101010) | 1085 | #define XPC_ANY_MSG_IPI_FLAGS_SET(_amo) ((_amo) & 0x1010101010101010) |