aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/sgi-xp/xpc_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/sgi-xp/xpc_main.c')
-rw-r--r--drivers/misc/sgi-xp/xpc_main.c60
1 files changed, 30 insertions, 30 deletions
diff --git a/drivers/misc/sgi-xp/xpc_main.c b/drivers/misc/sgi-xp/xpc_main.c
index f673ba90eb0e..08256ed0d9a6 100644
--- a/drivers/misc/sgi-xp/xpc_main.c
+++ b/drivers/misc/sgi-xp/xpc_main.c
@@ -315,13 +315,13 @@ xpc_initiate_discovery(void *ignore)
315 * the XPC per partition variables from the remote partition and waiting for 315 * the XPC per partition variables from the remote partition and waiting for
316 * the remote partition to pull ours. 316 * the remote partition to pull ours.
317 */ 317 */
318static enum xpc_retval 318static enum xp_retval
319xpc_make_first_contact(struct xpc_partition *part) 319xpc_make_first_contact(struct xpc_partition *part)
320{ 320{
321 enum xpc_retval ret; 321 enum xp_retval ret;
322 322
323 while ((ret = xpc_pull_remote_vars_part(part)) != xpcSuccess) { 323 while ((ret = xpc_pull_remote_vars_part(part)) != xpSuccess) {
324 if (ret != xpcRetry) { 324 if (ret != xpRetry) {
325 XPC_DEACTIVATE_PARTITION(part, ret); 325 XPC_DEACTIVATE_PARTITION(part, ret);
326 return ret; 326 return ret;
327 } 327 }
@@ -406,7 +406,7 @@ xpc_partition_up(struct xpc_partition *part)
406 406
407 dev_dbg(xpc_chan, "activating partition %d\n", XPC_PARTID(part)); 407 dev_dbg(xpc_chan, "activating partition %d\n", XPC_PARTID(part));
408 408
409 if (xpc_setup_infrastructure(part) != xpcSuccess) 409 if (xpc_setup_infrastructure(part) != xpSuccess)
410 return; 410 return;
411 411
412 /* 412 /*
@@ -418,7 +418,7 @@ xpc_partition_up(struct xpc_partition *part)
418 418
419 (void)xpc_part_ref(part); /* this will always succeed */ 419 (void)xpc_part_ref(part); /* this will always succeed */
420 420
421 if (xpc_make_first_contact(part) == xpcSuccess) 421 if (xpc_make_first_contact(part) == xpSuccess)
422 xpc_channel_mgr(part); 422 xpc_channel_mgr(part);
423 423
424 xpc_part_deref(part); 424 xpc_part_deref(part);
@@ -429,7 +429,7 @@ xpc_partition_up(struct xpc_partition *part)
429static int 429static int
430xpc_activating(void *__partid) 430xpc_activating(void *__partid)
431{ 431{
432 partid_t partid = (u64)__partid; 432 short partid = (u64)__partid;
433 struct xpc_partition *part = &xpc_partitions[partid]; 433 struct xpc_partition *part = &xpc_partitions[partid];
434 unsigned long irq_flags; 434 unsigned long irq_flags;
435 435
@@ -470,7 +470,7 @@ xpc_activating(void *__partid)
470 470
471 spin_lock_irqsave(&part->act_lock, irq_flags); 471 spin_lock_irqsave(&part->act_lock, irq_flags);
472 part->act_state = XPC_P_INACTIVE; 472 part->act_state = XPC_P_INACTIVE;
473 XPC_SET_REASON(part, xpcPhysAddrRegFailed, __LINE__); 473 XPC_SET_REASON(part, xpPhysAddrRegFailed, __LINE__);
474 spin_unlock_irqrestore(&part->act_lock, irq_flags); 474 spin_unlock_irqrestore(&part->act_lock, irq_flags);
475 part->remote_rp_pa = 0; 475 part->remote_rp_pa = 0;
476 return 0; 476 return 0;
@@ -488,7 +488,7 @@ xpc_activating(void *__partid)
488 xpc_disallow_hb(partid, xpc_vars); 488 xpc_disallow_hb(partid, xpc_vars);
489 xpc_mark_partition_inactive(part); 489 xpc_mark_partition_inactive(part);
490 490
491 if (part->reason == xpcReactivating) { 491 if (part->reason == xpReactivating) {
492 /* interrupting ourselves results in activating partition */ 492 /* interrupting ourselves results in activating partition */
493 xpc_IPI_send_reactivate(part); 493 xpc_IPI_send_reactivate(part);
494 } 494 }
@@ -499,7 +499,7 @@ xpc_activating(void *__partid)
499void 499void
500xpc_activate_partition(struct xpc_partition *part) 500xpc_activate_partition(struct xpc_partition *part)
501{ 501{
502 partid_t partid = XPC_PARTID(part); 502 short partid = XPC_PARTID(part);
503 unsigned long irq_flags; 503 unsigned long irq_flags;
504 struct task_struct *kthread; 504 struct task_struct *kthread;
505 505
@@ -508,7 +508,7 @@ xpc_activate_partition(struct xpc_partition *part)
508 DBUG_ON(part->act_state != XPC_P_INACTIVE); 508 DBUG_ON(part->act_state != XPC_P_INACTIVE);
509 509
510 part->act_state = XPC_P_ACTIVATION_REQ; 510 part->act_state = XPC_P_ACTIVATION_REQ;
511 XPC_SET_REASON(part, xpcCloneKThread, __LINE__); 511 XPC_SET_REASON(part, xpCloneKThread, __LINE__);
512 512
513 spin_unlock_irqrestore(&part->act_lock, irq_flags); 513 spin_unlock_irqrestore(&part->act_lock, irq_flags);
514 514
@@ -517,7 +517,7 @@ xpc_activate_partition(struct xpc_partition *part)
517 if (IS_ERR(kthread)) { 517 if (IS_ERR(kthread)) {
518 spin_lock_irqsave(&part->act_lock, irq_flags); 518 spin_lock_irqsave(&part->act_lock, irq_flags);
519 part->act_state = XPC_P_INACTIVE; 519 part->act_state = XPC_P_INACTIVE;
520 XPC_SET_REASON(part, xpcCloneKThreadFailed, __LINE__); 520 XPC_SET_REASON(part, xpCloneKThreadFailed, __LINE__);
521 spin_unlock_irqrestore(&part->act_lock, irq_flags); 521 spin_unlock_irqrestore(&part->act_lock, irq_flags);
522 } 522 }
523} 523}
@@ -541,7 +541,7 @@ xpc_activate_partition(struct xpc_partition *part)
541irqreturn_t 541irqreturn_t
542xpc_notify_IRQ_handler(int irq, void *dev_id) 542xpc_notify_IRQ_handler(int irq, void *dev_id)
543{ 543{
544 partid_t partid = (partid_t) (u64)dev_id; 544 short partid = (short)(u64)dev_id;
545 struct xpc_partition *part = &xpc_partitions[partid]; 545 struct xpc_partition *part = &xpc_partitions[partid];
546 546
547 DBUG_ON(partid <= 0 || partid >= XP_MAX_PARTITIONS); 547 DBUG_ON(partid <= 0 || partid >= XP_MAX_PARTITIONS);
@@ -643,7 +643,7 @@ xpc_kthread_waitmsgs(struct xpc_partition *part, struct xpc_channel *ch)
643static int 643static int
644xpc_kthread_start(void *args) 644xpc_kthread_start(void *args)
645{ 645{
646 partid_t partid = XPC_UNPACK_ARG1(args); 646 short partid = XPC_UNPACK_ARG1(args);
647 u16 ch_number = XPC_UNPACK_ARG2(args); 647 u16 ch_number = XPC_UNPACK_ARG2(args);
648 struct xpc_partition *part = &xpc_partitions[partid]; 648 struct xpc_partition *part = &xpc_partitions[partid];
649 struct xpc_channel *ch; 649 struct xpc_channel *ch;
@@ -696,7 +696,7 @@ xpc_kthread_start(void *args)
696 ch->flags |= XPC_C_DISCONNECTINGCALLOUT; 696 ch->flags |= XPC_C_DISCONNECTINGCALLOUT;
697 spin_unlock_irqrestore(&ch->lock, irq_flags); 697 spin_unlock_irqrestore(&ch->lock, irq_flags);
698 698
699 xpc_disconnect_callout(ch, xpcDisconnecting); 699 xpc_disconnect_callout(ch, xpDisconnecting);
700 700
701 spin_lock_irqsave(&ch->lock, irq_flags); 701 spin_lock_irqsave(&ch->lock, irq_flags);
702 ch->flags |= XPC_C_DISCONNECTINGCALLOUT_MADE; 702 ch->flags |= XPC_C_DISCONNECTINGCALLOUT_MADE;
@@ -776,7 +776,7 @@ xpc_create_kthreads(struct xpc_channel *ch, int needed,
776 * then we'll deadlock if all other kthreads assigned 776 * then we'll deadlock if all other kthreads assigned
777 * to this channel are blocked in the channel's 777 * to this channel are blocked in the channel's
778 * registerer, because the only thing that will unblock 778 * registerer, because the only thing that will unblock
779 * them is the xpcDisconnecting callout that this 779 * them is the xpDisconnecting callout that this
780 * failed kthread_run() would have made. 780 * failed kthread_run() would have made.
781 */ 781 */
782 782
@@ -796,7 +796,7 @@ xpc_create_kthreads(struct xpc_channel *ch, int needed,
796 * to function. 796 * to function.
797 */ 797 */
798 spin_lock_irqsave(&ch->lock, irq_flags); 798 spin_lock_irqsave(&ch->lock, irq_flags);
799 XPC_DISCONNECT_CHANNEL(ch, xpcLackOfResources, 799 XPC_DISCONNECT_CHANNEL(ch, xpLackOfResources,
800 &irq_flags); 800 &irq_flags);
801 spin_unlock_irqrestore(&ch->lock, irq_flags); 801 spin_unlock_irqrestore(&ch->lock, irq_flags);
802 } 802 }
@@ -809,7 +809,7 @@ void
809xpc_disconnect_wait(int ch_number) 809xpc_disconnect_wait(int ch_number)
810{ 810{
811 unsigned long irq_flags; 811 unsigned long irq_flags;
812 partid_t partid; 812 short partid;
813 struct xpc_partition *part; 813 struct xpc_partition *part;
814 struct xpc_channel *ch; 814 struct xpc_channel *ch;
815 int wakeup_channel_mgr; 815 int wakeup_channel_mgr;
@@ -857,9 +857,9 @@ xpc_disconnect_wait(int ch_number)
857} 857}
858 858
859static void 859static void
860xpc_do_exit(enum xpc_retval reason) 860xpc_do_exit(enum xp_retval reason)
861{ 861{
862 partid_t partid; 862 short partid;
863 int active_part_count, printed_waiting_msg = 0; 863 int active_part_count, printed_waiting_msg = 0;
864 struct xpc_partition *part; 864 struct xpc_partition *part;
865 unsigned long printmsg_time, disengage_request_timeout = 0; 865 unsigned long printmsg_time, disengage_request_timeout = 0;
@@ -955,7 +955,7 @@ xpc_do_exit(enum xpc_retval reason)
955 del_timer_sync(&xpc_hb_timer); 955 del_timer_sync(&xpc_hb_timer);
956 DBUG_ON(xpc_vars->heartbeating_to_mask != 0); 956 DBUG_ON(xpc_vars->heartbeating_to_mask != 0);
957 957
958 if (reason == xpcUnloading) { 958 if (reason == xpUnloading) {
959 /* take ourselves off of the reboot_notifier_list */ 959 /* take ourselves off of the reboot_notifier_list */
960 (void)unregister_reboot_notifier(&xpc_reboot_notifier); 960 (void)unregister_reboot_notifier(&xpc_reboot_notifier);
961 961
@@ -981,20 +981,20 @@ xpc_do_exit(enum xpc_retval reason)
981static int 981static int
982xpc_system_reboot(struct notifier_block *nb, unsigned long event, void *unused) 982xpc_system_reboot(struct notifier_block *nb, unsigned long event, void *unused)
983{ 983{
984 enum xpc_retval reason; 984 enum xp_retval reason;
985 985
986 switch (event) { 986 switch (event) {
987 case SYS_RESTART: 987 case SYS_RESTART:
988 reason = xpcSystemReboot; 988 reason = xpSystemReboot;
989 break; 989 break;
990 case SYS_HALT: 990 case SYS_HALT:
991 reason = xpcSystemHalt; 991 reason = xpSystemHalt;
992 break; 992 break;
993 case SYS_POWER_OFF: 993 case SYS_POWER_OFF:
994 reason = xpcSystemPoweroff; 994 reason = xpSystemPoweroff;
995 break; 995 break;
996 default: 996 default:
997 reason = xpcSystemGoingDown; 997 reason = xpSystemGoingDown;
998 } 998 }
999 999
1000 xpc_do_exit(reason); 1000 xpc_do_exit(reason);
@@ -1008,7 +1008,7 @@ static void
1008xpc_die_disengage(void) 1008xpc_die_disengage(void)
1009{ 1009{
1010 struct xpc_partition *part; 1010 struct xpc_partition *part;
1011 partid_t partid; 1011 short partid;
1012 unsigned long engaged; 1012 unsigned long engaged;
1013 long time, printmsg_time, disengage_request_timeout; 1013 long time, printmsg_time, disengage_request_timeout;
1014 1014
@@ -1124,7 +1124,7 @@ int __init
1124xpc_init(void) 1124xpc_init(void)
1125{ 1125{
1126 int ret; 1126 int ret;
1127 partid_t partid; 1127 short partid;
1128 struct xpc_partition *part; 1128 struct xpc_partition *part;
1129 struct task_struct *kthread; 1129 struct task_struct *kthread;
1130 size_t buf_size; 1130 size_t buf_size;
@@ -1279,7 +1279,7 @@ xpc_init(void)
1279 /* mark this new thread as a non-starter */ 1279 /* mark this new thread as a non-starter */
1280 complete(&xpc_discovery_exited); 1280 complete(&xpc_discovery_exited);
1281 1281
1282 xpc_do_exit(xpcUnloading); 1282 xpc_do_exit(xpUnloading);
1283 return -EBUSY; 1283 return -EBUSY;
1284 } 1284 }
1285 1285
@@ -1297,7 +1297,7 @@ module_init(xpc_init);
1297void __exit 1297void __exit
1298xpc_exit(void) 1298xpc_exit(void)
1299{ 1299{
1300 xpc_do_exit(xpcUnloading); 1300 xpc_do_exit(xpUnloading);
1301} 1301}
1302 1302
1303module_exit(xpc_exit); 1303module_exit(xpc_exit);