aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/sgi-xp/xpc.h
diff options
context:
space:
mode:
authorRobin Holt <holt@sgi.com>2009-04-13 17:40:19 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-13 18:04:33 -0400
commita7665b0a380585fbd70a2275f3120c6086e0c92d (patch)
tree01465e3d7a8bc917084e9a47789f3508c38307cf /drivers/misc/sgi-xp/xpc.h
parentefdd06ed181a88a11e612238c1ac04668e665395 (diff)
sgi-xpc: clean up numerous globals
Introduce xpc_arch_ops and eliminate numerous individual global definitions. Signed-off-by: Robin Holt <holt@sgi.com> Cc: 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.h112
1 files changed, 57 insertions, 55 deletions
diff --git a/drivers/misc/sgi-xp/xpc.h b/drivers/misc/sgi-xp/xpc.h
index a54047674785..b94d5f767703 100644
--- a/drivers/misc/sgi-xp/xpc.h
+++ b/drivers/misc/sgi-xp/xpc.h
@@ -780,6 +780,62 @@ struct xpc_partition {
780 780
781} ____cacheline_aligned; 781} ____cacheline_aligned;
782 782
783struct xpc_arch_operations {
784 int (*setup_partitions) (void);
785 void (*teardown_partitions) (void);
786 void (*process_activate_IRQ_rcvd) (void);
787 enum xp_retval (*get_partition_rsvd_page_pa)
788 (void *, u64 *, unsigned long *, size_t *);
789 int (*setup_rsvd_page) (struct xpc_rsvd_page *);
790
791 void (*allow_hb) (short);
792 void (*disallow_hb) (short);
793 void (*disallow_all_hbs) (void);
794 void (*increment_heartbeat) (void);
795 void (*offline_heartbeat) (void);
796 void (*online_heartbeat) (void);
797 void (*heartbeat_init) (void);
798 void (*heartbeat_exit) (void);
799 enum xp_retval (*get_remote_heartbeat) (struct xpc_partition *);
800
801 void (*request_partition_activation) (struct xpc_rsvd_page *,
802 unsigned long, int);
803 void (*request_partition_reactivation) (struct xpc_partition *);
804 void (*request_partition_deactivation) (struct xpc_partition *);
805 void (*cancel_partition_deactivation_request) (struct xpc_partition *);
806 enum xp_retval (*setup_ch_structures) (struct xpc_partition *);
807 void (*teardown_ch_structures) (struct xpc_partition *);
808
809 enum xp_retval (*make_first_contact) (struct xpc_partition *);
810
811 u64 (*get_chctl_all_flags) (struct xpc_partition *);
812 void (*send_chctl_closerequest) (struct xpc_channel *, unsigned long *);
813 void (*send_chctl_closereply) (struct xpc_channel *, unsigned long *);
814 void (*send_chctl_openrequest) (struct xpc_channel *, unsigned long *);
815 void (*send_chctl_openreply) (struct xpc_channel *, unsigned long *);
816 void (*send_chctl_opencomplete) (struct xpc_channel *, unsigned long *);
817 void (*process_msg_chctl_flags) (struct xpc_partition *, int);
818
819 enum xp_retval (*save_remote_msgqueue_pa) (struct xpc_channel *,
820 unsigned long);
821
822 enum xp_retval (*setup_msg_structures) (struct xpc_channel *);
823 void (*teardown_msg_structures) (struct xpc_channel *);
824
825 void (*indicate_partition_engaged) (struct xpc_partition *);
826 void (*indicate_partition_disengaged) (struct xpc_partition *);
827 void (*assume_partition_disengaged) (short);
828 int (*partition_engaged) (short);
829 int (*any_partition_engaged) (void);
830
831 int (*n_of_deliverable_payloads) (struct xpc_channel *);
832 enum xp_retval (*send_payload) (struct xpc_channel *, u32, void *,
833 u16, u8, xpc_notify_func, void *);
834 void *(*get_deliverable_payload) (struct xpc_channel *);
835 void (*received_payload) (struct xpc_channel *, void *);
836 void (*notify_senders_of_disconnect) (struct xpc_channel *);
837};
838
783/* struct xpc_partition act_state values (for XPC HB) */ 839/* struct xpc_partition act_state values (for XPC HB) */
784 840
785#define XPC_P_AS_INACTIVE 0x00 /* partition is not active */ 841#define XPC_P_AS_INACTIVE 0x00 /* partition is not active */
@@ -820,6 +876,7 @@ extern struct xpc_registration xpc_registrations[];
820/* found in xpc_main.c */ 876/* found in xpc_main.c */
821extern struct device *xpc_part; 877extern struct device *xpc_part;
822extern struct device *xpc_chan; 878extern struct device *xpc_chan;
879extern struct xpc_arch_operations xpc_arch_ops;
823extern int xpc_disengage_timelimit; 880extern int xpc_disengage_timelimit;
824extern int xpc_disengage_timedout; 881extern int xpc_disengage_timedout;
825extern int xpc_activate_IRQ_rcvd; 882extern int xpc_activate_IRQ_rcvd;
@@ -830,61 +887,6 @@ extern void xpc_activate_partition(struct xpc_partition *);
830extern void xpc_activate_kthreads(struct xpc_channel *, int); 887extern void xpc_activate_kthreads(struct xpc_channel *, int);
831extern void xpc_create_kthreads(struct xpc_channel *, int, int); 888extern void xpc_create_kthreads(struct xpc_channel *, int, int);
832extern void xpc_disconnect_wait(int); 889extern void xpc_disconnect_wait(int);
833extern int (*xpc_setup_partitions_sn) (void);
834extern void (*xpc_teardown_partitions_sn) (void);
835extern enum xp_retval (*xpc_get_partition_rsvd_page_pa) (void *, u64 *,
836 unsigned long *,
837 size_t *);
838extern int (*xpc_setup_rsvd_page_sn) (struct xpc_rsvd_page *);
839extern void (*xpc_heartbeat_init) (void);
840extern void (*xpc_heartbeat_exit) (void);
841extern void (*xpc_increment_heartbeat) (void);
842extern void (*xpc_offline_heartbeat) (void);
843extern void (*xpc_online_heartbeat) (void);
844extern enum xp_retval (*xpc_get_remote_heartbeat) (struct xpc_partition *);
845extern void (*xpc_allow_hb) (short);
846extern void (*xpc_disallow_hb) (short);
847extern void (*xpc_disallow_all_hbs) (void);
848extern enum xp_retval (*xpc_make_first_contact) (struct xpc_partition *);
849extern u64 (*xpc_get_chctl_all_flags) (struct xpc_partition *);
850extern enum xp_retval (*xpc_setup_msg_structures) (struct xpc_channel *);
851extern void (*xpc_teardown_msg_structures) (struct xpc_channel *);
852extern void (*xpc_notify_senders_of_disconnect) (struct xpc_channel *);
853extern void (*xpc_process_msg_chctl_flags) (struct xpc_partition *, int);
854extern int (*xpc_n_of_deliverable_payloads) (struct xpc_channel *);
855extern void *(*xpc_get_deliverable_payload) (struct xpc_channel *);
856extern void (*xpc_request_partition_activation) (struct xpc_rsvd_page *,
857 unsigned long, int);
858extern void (*xpc_request_partition_reactivation) (struct xpc_partition *);
859extern void (*xpc_request_partition_deactivation) (struct xpc_partition *);
860extern void (*xpc_cancel_partition_deactivation_request) (
861 struct xpc_partition *);
862extern void (*xpc_process_activate_IRQ_rcvd) (void);
863extern enum xp_retval (*xpc_setup_ch_structures_sn) (struct xpc_partition *);
864extern void (*xpc_teardown_ch_structures_sn) (struct xpc_partition *);
865
866extern void (*xpc_indicate_partition_engaged) (struct xpc_partition *);
867extern int (*xpc_partition_engaged) (short);
868extern int (*xpc_any_partition_engaged) (void);
869extern void (*xpc_indicate_partition_disengaged) (struct xpc_partition *);
870extern void (*xpc_assume_partition_disengaged) (short);
871
872extern void (*xpc_send_chctl_closerequest) (struct xpc_channel *,
873 unsigned long *);
874extern void (*xpc_send_chctl_closereply) (struct xpc_channel *,
875 unsigned long *);
876extern void (*xpc_send_chctl_openrequest) (struct xpc_channel *,
877 unsigned long *);
878extern void (*xpc_send_chctl_openreply) (struct xpc_channel *, unsigned long *);
879extern void (*xpc_send_chctl_opencomplete) (struct xpc_channel *,
880 unsigned long *);
881
882extern enum xp_retval (*xpc_save_remote_msgqueue_pa) (struct xpc_channel *,
883 unsigned long);
884
885extern enum xp_retval (*xpc_send_payload) (struct xpc_channel *, u32, void *,
886 u16, u8, xpc_notify_func, void *);
887extern void (*xpc_received_payload) (struct xpc_channel *, void *);
888 890
889/* found in xpc_sn2.c */ 891/* found in xpc_sn2.c */
890extern int xpc_init_sn2(void); 892extern int xpc_init_sn2(void);