aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/sgi-xp/xpc_uv.c
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_uv.c
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_uv.c')
-rw-r--r--drivers/misc/sgi-xp/xpc_uv.c122
1 files changed, 63 insertions, 59 deletions
diff --git a/drivers/misc/sgi-xp/xpc_uv.c b/drivers/misc/sgi-xp/xpc_uv.c
index 1e475b4c0887..9172fcdee4e2 100644
--- a/drivers/misc/sgi-xp/xpc_uv.c
+++ b/drivers/misc/sgi-xp/xpc_uv.c
@@ -62,7 +62,7 @@ static struct xpc_gru_mq_uv *xpc_activate_mq_uv;
62static struct xpc_gru_mq_uv *xpc_notify_mq_uv; 62static struct xpc_gru_mq_uv *xpc_notify_mq_uv;
63 63
64static int 64static int
65xpc_setup_partitions_sn_uv(void) 65xpc_setup_partitions_uv(void)
66{ 66{
67 short partid; 67 short partid;
68 struct xpc_partition_uv *part_uv; 68 struct xpc_partition_uv *part_uv;
@@ -78,7 +78,7 @@ xpc_setup_partitions_sn_uv(void)
78} 78}
79 79
80static void 80static void
81xpc_teardown_partitions_sn_uv(void) 81xpc_teardown_partitions_uv(void)
82{ 82{
83 short partid; 83 short partid;
84 struct xpc_partition_uv *part_uv; 84 struct xpc_partition_uv *part_uv;
@@ -782,7 +782,7 @@ xpc_get_partition_rsvd_page_pa_uv(void *buf, u64 *cookie, unsigned long *rp_pa,
782} 782}
783 783
784static int 784static int
785xpc_setup_rsvd_page_sn_uv(struct xpc_rsvd_page *rp) 785xpc_setup_rsvd_page_uv(struct xpc_rsvd_page *rp)
786{ 786{
787 xpc_heartbeat_uv = 787 xpc_heartbeat_uv =
788 &xpc_partitions[sn_partition_id].sn.uv.cached_heartbeat; 788 &xpc_partitions[sn_partition_id].sn.uv.cached_heartbeat;
@@ -980,7 +980,7 @@ xpc_n_of_fifo_entries_uv(struct xpc_fifo_head_uv *head)
980 * Setup the channel structures that are uv specific. 980 * Setup the channel structures that are uv specific.
981 */ 981 */
982static enum xp_retval 982static enum xp_retval
983xpc_setup_ch_structures_sn_uv(struct xpc_partition *part) 983xpc_setup_ch_structures_uv(struct xpc_partition *part)
984{ 984{
985 struct xpc_channel_uv *ch_uv; 985 struct xpc_channel_uv *ch_uv;
986 int ch_number; 986 int ch_number;
@@ -999,7 +999,7 @@ xpc_setup_ch_structures_sn_uv(struct xpc_partition *part)
999 * Teardown the channel structures that are uv specific. 999 * Teardown the channel structures that are uv specific.
1000 */ 1000 */
1001static void 1001static void
1002xpc_teardown_ch_structures_sn_uv(struct xpc_partition *part) 1002xpc_teardown_ch_structures_uv(struct xpc_partition *part)
1003{ 1003{
1004 /* nothing needs to be done */ 1004 /* nothing needs to be done */
1005 return; 1005 return;
@@ -1649,63 +1649,67 @@ xpc_received_payload_uv(struct xpc_channel *ch, void *payload)
1649 msg->hdr.msg_slot_number += ch->remote_nentries; 1649 msg->hdr.msg_slot_number += ch->remote_nentries;
1650} 1650}
1651 1651
1652static struct xpc_arch_operations xpc_arch_ops_uv = {
1653 .setup_partitions = xpc_setup_partitions_uv,
1654 .teardown_partitions = xpc_teardown_partitions_uv,
1655 .process_activate_IRQ_rcvd = xpc_process_activate_IRQ_rcvd_uv,
1656 .get_partition_rsvd_page_pa = xpc_get_partition_rsvd_page_pa_uv,
1657 .setup_rsvd_page = xpc_setup_rsvd_page_uv,
1658
1659 .allow_hb = xpc_allow_hb_uv,
1660 .disallow_hb = xpc_disallow_hb_uv,
1661 .disallow_all_hbs = xpc_disallow_all_hbs_uv,
1662 .increment_heartbeat = xpc_increment_heartbeat_uv,
1663 .offline_heartbeat = xpc_offline_heartbeat_uv,
1664 .online_heartbeat = xpc_online_heartbeat_uv,
1665 .heartbeat_init = xpc_heartbeat_init_uv,
1666 .heartbeat_exit = xpc_heartbeat_exit_uv,
1667 .get_remote_heartbeat = xpc_get_remote_heartbeat_uv,
1668
1669 .request_partition_activation =
1670 xpc_request_partition_activation_uv,
1671 .request_partition_reactivation =
1672 xpc_request_partition_reactivation_uv,
1673 .request_partition_deactivation =
1674 xpc_request_partition_deactivation_uv,
1675 .cancel_partition_deactivation_request =
1676 xpc_cancel_partition_deactivation_request_uv,
1677
1678 .setup_ch_structures = xpc_setup_ch_structures_uv,
1679 .teardown_ch_structures = xpc_teardown_ch_structures_uv,
1680
1681 .make_first_contact = xpc_make_first_contact_uv,
1682
1683 .get_chctl_all_flags = xpc_get_chctl_all_flags_uv,
1684 .send_chctl_closerequest = xpc_send_chctl_closerequest_uv,
1685 .send_chctl_closereply = xpc_send_chctl_closereply_uv,
1686 .send_chctl_openrequest = xpc_send_chctl_openrequest_uv,
1687 .send_chctl_openreply = xpc_send_chctl_openreply_uv,
1688 .send_chctl_opencomplete = xpc_send_chctl_opencomplete_uv,
1689 .process_msg_chctl_flags = xpc_process_msg_chctl_flags_uv,
1690
1691 .save_remote_msgqueue_pa = xpc_save_remote_msgqueue_pa_uv,
1692
1693 .setup_msg_structures = xpc_setup_msg_structures_uv,
1694 .teardown_msg_structures = xpc_teardown_msg_structures_uv,
1695
1696 .indicate_partition_engaged = xpc_indicate_partition_engaged_uv,
1697 .indicate_partition_disengaged = xpc_indicate_partition_disengaged_uv,
1698 .assume_partition_disengaged = xpc_assume_partition_disengaged_uv,
1699 .partition_engaged = xpc_partition_engaged_uv,
1700 .any_partition_engaged = xpc_any_partition_engaged_uv,
1701
1702 .n_of_deliverable_payloads = xpc_n_of_deliverable_payloads_uv,
1703 .send_payload = xpc_send_payload_uv,
1704 .get_deliverable_payload = xpc_get_deliverable_payload_uv,
1705 .received_payload = xpc_received_payload_uv,
1706 .notify_senders_of_disconnect = xpc_notify_senders_of_disconnect_uv,
1707};
1708
1652int 1709int
1653xpc_init_uv(void) 1710xpc_init_uv(void)
1654{ 1711{
1655 xpc_setup_partitions_sn = xpc_setup_partitions_sn_uv; 1712 xpc_arch_ops = xpc_arch_ops_uv;
1656 xpc_teardown_partitions_sn = xpc_teardown_partitions_sn_uv;
1657 xpc_process_activate_IRQ_rcvd = xpc_process_activate_IRQ_rcvd_uv;
1658 xpc_get_partition_rsvd_page_pa = xpc_get_partition_rsvd_page_pa_uv;
1659 xpc_setup_rsvd_page_sn = xpc_setup_rsvd_page_sn_uv;
1660
1661 xpc_allow_hb = xpc_allow_hb_uv;
1662 xpc_disallow_hb = xpc_disallow_hb_uv;
1663 xpc_disallow_all_hbs = xpc_disallow_all_hbs_uv;
1664 xpc_increment_heartbeat = xpc_increment_heartbeat_uv;
1665 xpc_offline_heartbeat = xpc_offline_heartbeat_uv;
1666 xpc_online_heartbeat = xpc_online_heartbeat_uv;
1667 xpc_heartbeat_init = xpc_heartbeat_init_uv;
1668 xpc_heartbeat_exit = xpc_heartbeat_exit_uv;
1669 xpc_get_remote_heartbeat = xpc_get_remote_heartbeat_uv;
1670
1671 xpc_request_partition_activation = xpc_request_partition_activation_uv;
1672 xpc_request_partition_reactivation =
1673 xpc_request_partition_reactivation_uv;
1674 xpc_request_partition_deactivation =
1675 xpc_request_partition_deactivation_uv;
1676 xpc_cancel_partition_deactivation_request =
1677 xpc_cancel_partition_deactivation_request_uv;
1678
1679 xpc_setup_ch_structures_sn = xpc_setup_ch_structures_sn_uv;
1680 xpc_teardown_ch_structures_sn = xpc_teardown_ch_structures_sn_uv;
1681
1682 xpc_make_first_contact = xpc_make_first_contact_uv;
1683
1684 xpc_get_chctl_all_flags = xpc_get_chctl_all_flags_uv;
1685 xpc_send_chctl_closerequest = xpc_send_chctl_closerequest_uv;
1686 xpc_send_chctl_closereply = xpc_send_chctl_closereply_uv;
1687 xpc_send_chctl_openrequest = xpc_send_chctl_openrequest_uv;
1688 xpc_send_chctl_openreply = xpc_send_chctl_openreply_uv;
1689 xpc_send_chctl_opencomplete = xpc_send_chctl_opencomplete_uv;
1690
1691 xpc_save_remote_msgqueue_pa = xpc_save_remote_msgqueue_pa_uv;
1692
1693 xpc_setup_msg_structures = xpc_setup_msg_structures_uv;
1694 xpc_teardown_msg_structures = xpc_teardown_msg_structures_uv;
1695
1696 xpc_indicate_partition_engaged = xpc_indicate_partition_engaged_uv;
1697 xpc_indicate_partition_disengaged =
1698 xpc_indicate_partition_disengaged_uv;
1699 xpc_assume_partition_disengaged = xpc_assume_partition_disengaged_uv;
1700 xpc_partition_engaged = xpc_partition_engaged_uv;
1701 xpc_any_partition_engaged = xpc_any_partition_engaged_uv;
1702
1703 xpc_n_of_deliverable_payloads = xpc_n_of_deliverable_payloads_uv;
1704 xpc_process_msg_chctl_flags = xpc_process_msg_chctl_flags_uv;
1705 xpc_send_payload = xpc_send_payload_uv;
1706 xpc_notify_senders_of_disconnect = xpc_notify_senders_of_disconnect_uv;
1707 xpc_get_deliverable_payload = xpc_get_deliverable_payload_uv;
1708 xpc_received_payload = xpc_received_payload_uv;
1709 1713
1710 if (sizeof(struct xpc_notify_mq_msghdr_uv) > XPC_MSG_HDR_MAX_SIZE) { 1714 if (sizeof(struct xpc_notify_mq_msghdr_uv) > XPC_MSG_HDR_MAX_SIZE) {
1711 dev_err(xpc_part, "xpc_notify_mq_msghdr_uv is larger than %d\n", 1715 dev_err(xpc_part, "xpc_notify_mq_msghdr_uv is larger than %d\n",