diff options
Diffstat (limited to 'drivers/misc/sgi-xp/xpc_main.c')
-rw-r--r-- | drivers/misc/sgi-xp/xpc_main.c | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/drivers/misc/sgi-xp/xpc_main.c b/drivers/misc/sgi-xp/xpc_main.c index a05c7c7da228..2180f1f7e087 100644 --- a/drivers/misc/sgi-xp/xpc_main.c +++ b/drivers/misc/sgi-xp/xpc_main.c | |||
@@ -175,6 +175,8 @@ static struct notifier_block xpc_die_notifier = { | |||
175 | .notifier_call = xpc_system_die, | 175 | .notifier_call = xpc_system_die, |
176 | }; | 176 | }; |
177 | 177 | ||
178 | enum xp_retval (*xpc_rsvd_page_init) (struct xpc_rsvd_page *rp); | ||
179 | |||
178 | /* | 180 | /* |
179 | * Timer function to enforce the timelimit on the partition disengage request. | 181 | * Timer function to enforce the timelimit on the partition disengage request. |
180 | */ | 182 | */ |
@@ -949,7 +951,7 @@ xpc_do_exit(enum xp_retval reason) | |||
949 | DBUG_ON(xpc_partition_engaged(-1UL)); | 951 | DBUG_ON(xpc_partition_engaged(-1UL)); |
950 | 952 | ||
951 | /* indicate to others that our reserved page is uninitialized */ | 953 | /* indicate to others that our reserved page is uninitialized */ |
952 | xpc_rsvd_page->vars_pa = 0; | 954 | xpc_rsvd_page->stamp = ZERO_STAMP; |
953 | 955 | ||
954 | /* now it's time to eliminate our heartbeat */ | 956 | /* now it's time to eliminate our heartbeat */ |
955 | del_timer_sync(&xpc_hb_timer); | 957 | del_timer_sync(&xpc_hb_timer); |
@@ -1128,8 +1130,24 @@ xpc_init(void) | |||
1128 | struct task_struct *kthread; | 1130 | struct task_struct *kthread; |
1129 | size_t buf_size; | 1131 | size_t buf_size; |
1130 | 1132 | ||
1131 | if (!ia64_platform_is("sn2")) | 1133 | if (is_shub()) { |
1134 | /* | ||
1135 | * The ia64-sn2 architecture supports at most 64 partitions. | ||
1136 | * And the inability to unregister remote AMOs restricts us | ||
1137 | * further to only support exactly 64 partitions on this | ||
1138 | * architecture, no less. | ||
1139 | */ | ||
1140 | if (xp_max_npartitions != 64) | ||
1141 | return -EINVAL; | ||
1142 | |||
1143 | xpc_init_sn2(); | ||
1144 | |||
1145 | } else if (is_uv()) { | ||
1146 | xpc_init_uv(); | ||
1147 | |||
1148 | } else { | ||
1132 | return -ENODEV; | 1149 | return -ENODEV; |
1150 | } | ||
1133 | 1151 | ||
1134 | snprintf(xpc_part->bus_id, BUS_ID_SIZE, "part"); | 1152 | snprintf(xpc_part->bus_id, BUS_ID_SIZE, "part"); |
1135 | snprintf(xpc_chan->bus_id, BUS_ID_SIZE, "chan"); | 1153 | snprintf(xpc_chan->bus_id, BUS_ID_SIZE, "chan"); |
@@ -1214,7 +1232,7 @@ xpc_init(void) | |||
1214 | * other partitions to discover we are alive and establish initial | 1232 | * other partitions to discover we are alive and establish initial |
1215 | * communications. | 1233 | * communications. |
1216 | */ | 1234 | */ |
1217 | xpc_rsvd_page = xpc_rsvd_page_init(); | 1235 | xpc_rsvd_page = xpc_setup_rsvd_page(); |
1218 | if (xpc_rsvd_page == NULL) { | 1236 | if (xpc_rsvd_page == NULL) { |
1219 | dev_err(xpc_part, "can't setup our reserved page\n"); | 1237 | dev_err(xpc_part, "can't setup our reserved page\n"); |
1220 | ret = -EBUSY; | 1238 | ret = -EBUSY; |
@@ -1273,7 +1291,8 @@ xpc_init(void) | |||
1273 | /* initialization was not successful */ | 1291 | /* initialization was not successful */ |
1274 | out_4: | 1292 | out_4: |
1275 | /* indicate to others that our reserved page is uninitialized */ | 1293 | /* indicate to others that our reserved page is uninitialized */ |
1276 | xpc_rsvd_page->vars_pa = 0; | 1294 | xpc_rsvd_page->stamp = ZERO_STAMP; |
1295 | |||
1277 | del_timer_sync(&xpc_hb_timer); | 1296 | del_timer_sync(&xpc_hb_timer); |
1278 | (void)unregister_die_notifier(&xpc_die_notifier); | 1297 | (void)unregister_die_notifier(&xpc_die_notifier); |
1279 | (void)unregister_reboot_notifier(&xpc_reboot_notifier); | 1298 | (void)unregister_reboot_notifier(&xpc_reboot_notifier); |