aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDean Nelson <dcn@sgi.com>2006-01-10 12:08:55 -0500
committerTony Luck <tony.luck@intel.com>2006-01-13 13:36:27 -0500
commitd6ad033a88b42420ddb6c62c95e42f88d862b246 (patch)
tree8e4fb8900e4eed320457307d9976dd8108adf8cd
parent1f4674b2d5f63bac4c393ac4de1d6c1b6b72c09c (diff)
[IA64-SGI] move xpc_system_reboot()
Move xpc_system_reboot() to be closer to the file it calls for readability reasons (which are indeed subjective). Signed-off-by: Dean Nelson <dcn@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
-rw-r--r--arch/ia64/sn/kernel/xpc_main.c58
1 files changed, 29 insertions, 29 deletions
diff --git a/arch/ia64/sn/kernel/xpc_main.c b/arch/ia64/sn/kernel/xpc_main.c
index db57b46bddd5..50a0c09bca80 100644
--- a/arch/ia64/sn/kernel/xpc_main.c
+++ b/arch/ia64/sn/kernel/xpc_main.c
@@ -1047,7 +1047,35 @@ xpc_do_exit(enum xpc_retval reason)
1047 1047
1048 1048
1049/* 1049/*
1050 * Called when the system is about to be either restarted or halted. 1050 * This function is called when the system is being rebooted.
1051 */
1052static int
1053xpc_system_reboot(struct notifier_block *nb, unsigned long event, void *unused)
1054{
1055 enum xpc_retval reason;
1056
1057
1058 switch (event) {
1059 case SYS_RESTART:
1060 reason = xpcSystemReboot;
1061 break;
1062 case SYS_HALT:
1063 reason = xpcSystemHalt;
1064 break;
1065 case SYS_POWER_OFF:
1066 reason = xpcSystemPoweroff;
1067 break;
1068 default:
1069 reason = xpcSystemGoingDown;
1070 }
1071
1072 xpc_do_exit(reason);
1073 return NOTIFY_DONE;
1074}
1075
1076
1077/*
1078 * Notify other partitions to disengage from all references to our memory.
1051 */ 1079 */
1052static void 1080static void
1053xpc_die_disengage(void) 1081xpc_die_disengage(void)
@@ -1123,34 +1151,6 @@ xpc_die_disengage(void)
1123 1151
1124 1152
1125/* 1153/*
1126 * This function is called when the system is being rebooted.
1127 */
1128static int
1129xpc_system_reboot(struct notifier_block *nb, unsigned long event, void *unused)
1130{
1131 enum xpc_retval reason;
1132
1133
1134 switch (event) {
1135 case SYS_RESTART:
1136 reason = xpcSystemReboot;
1137 break;
1138 case SYS_HALT:
1139 reason = xpcSystemHalt;
1140 break;
1141 case SYS_POWER_OFF:
1142 reason = xpcSystemPoweroff;
1143 break;
1144 default:
1145 reason = xpcSystemGoingDown;
1146 }
1147
1148 xpc_do_exit(reason);
1149 return NOTIFY_DONE;
1150}
1151
1152
1153/*
1154 * This function is called when the system is being restarted or halted due 1154 * This function is called when the system is being restarted or halted due
1155 * to some sort of system failure. If this is the case we need to notify the 1155 * to some sort of system failure. If this is the case we need to notify the
1156 * other partitions to disengage from all references to our memory. 1156 * other partitions to disengage from all references to our memory.