.. | .. |
---|
3 | 3 | * License. See the file "COPYING" in the main directory of this archive |
---|
4 | 4 | * for more details. |
---|
5 | 5 | * |
---|
| 6 | + * (C) Copyright 2020 Hewlett Packard Enterprise Development LP |
---|
6 | 7 | * Copyright (c) 2004-2009 Silicon Graphics, Inc. All Rights Reserved. |
---|
7 | 8 | */ |
---|
8 | 9 | |
---|
.. | .. |
---|
59 | 60 | |
---|
60 | 61 | /* define two XPC debug device structures to be used with dev_dbg() et al */ |
---|
61 | 62 | |
---|
62 | | -struct device_driver xpc_dbg_name = { |
---|
| 63 | +static struct device_driver xpc_dbg_name = { |
---|
63 | 64 | .name = "xpc" |
---|
64 | 65 | }; |
---|
65 | 66 | |
---|
66 | | -struct device xpc_part_dbg_subname = { |
---|
| 67 | +static struct device xpc_part_dbg_subname = { |
---|
67 | 68 | .init_name = "", /* set to "part" at xpc_init() time */ |
---|
68 | 69 | .driver = &xpc_dbg_name |
---|
69 | 70 | }; |
---|
70 | 71 | |
---|
71 | | -struct device xpc_chan_dbg_subname = { |
---|
| 72 | +static struct device xpc_chan_dbg_subname = { |
---|
72 | 73 | .init_name = "", /* set to "chan" at xpc_init() time */ |
---|
73 | 74 | .driver = &xpc_dbg_name |
---|
74 | 75 | }; |
---|
.. | .. |
---|
279 | 280 | |
---|
280 | 281 | dev_dbg(xpc_part, "checking remote heartbeats\n"); |
---|
281 | 282 | xpc_check_remote_hb(); |
---|
282 | | - |
---|
283 | | - /* |
---|
284 | | - * On sn2 we need to periodically recheck to ensure no |
---|
285 | | - * IRQ/amo pairs have been missed. |
---|
286 | | - */ |
---|
287 | | - if (is_shub()) |
---|
288 | | - force_IRQ = 1; |
---|
289 | 283 | } |
---|
290 | 284 | |
---|
291 | 285 | /* check for outstanding IRQs */ |
---|
.. | .. |
---|
1050 | 1044 | |
---|
1051 | 1045 | xpc_teardown_partitions(); |
---|
1052 | 1046 | |
---|
1053 | | - if (is_shub()) |
---|
1054 | | - xpc_exit_sn2(); |
---|
1055 | | - else if (is_uv()) |
---|
| 1047 | + if (is_uv_system()) |
---|
1056 | 1048 | xpc_exit_uv(); |
---|
1057 | 1049 | } |
---|
1058 | 1050 | |
---|
.. | .. |
---|
1182 | 1174 | if (!xpc_kdebug_ignore) |
---|
1183 | 1175 | break; |
---|
1184 | 1176 | |
---|
1185 | | - /* fall through */ |
---|
| 1177 | + fallthrough; |
---|
1186 | 1178 | case DIE_MCA_MONARCH_ENTER: |
---|
1187 | 1179 | case DIE_INIT_MONARCH_ENTER: |
---|
1188 | 1180 | xpc_arch_ops.offline_heartbeat(); |
---|
.. | .. |
---|
1193 | 1185 | if (!xpc_kdebug_ignore) |
---|
1194 | 1186 | break; |
---|
1195 | 1187 | |
---|
1196 | | - /* fall through */ |
---|
| 1188 | + fallthrough; |
---|
1197 | 1189 | case DIE_MCA_MONARCH_LEAVE: |
---|
1198 | 1190 | case DIE_INIT_MONARCH_LEAVE: |
---|
1199 | 1191 | xpc_arch_ops.online_heartbeat(); |
---|
.. | .. |
---|
1226 | 1218 | return NOTIFY_DONE; |
---|
1227 | 1219 | } |
---|
1228 | 1220 | |
---|
1229 | | -int __init |
---|
| 1221 | +static int __init |
---|
1230 | 1222 | xpc_init(void) |
---|
1231 | 1223 | { |
---|
1232 | 1224 | int ret; |
---|
.. | .. |
---|
1235 | 1227 | dev_set_name(xpc_part, "part"); |
---|
1236 | 1228 | dev_set_name(xpc_chan, "chan"); |
---|
1237 | 1229 | |
---|
1238 | | - if (is_shub()) { |
---|
1239 | | - /* |
---|
1240 | | - * The ia64-sn2 architecture supports at most 64 partitions. |
---|
1241 | | - * And the inability to unregister remote amos restricts us |
---|
1242 | | - * further to only support exactly 64 partitions on this |
---|
1243 | | - * architecture, no less. |
---|
1244 | | - */ |
---|
1245 | | - if (xp_max_npartitions != 64) { |
---|
1246 | | - dev_err(xpc_part, "max #of partitions not set to 64\n"); |
---|
1247 | | - ret = -EINVAL; |
---|
1248 | | - } else { |
---|
1249 | | - ret = xpc_init_sn2(); |
---|
1250 | | - } |
---|
1251 | | - |
---|
1252 | | - } else if (is_uv()) { |
---|
| 1230 | + if (is_uv_system()) { |
---|
1253 | 1231 | ret = xpc_init_uv(); |
---|
1254 | 1232 | |
---|
1255 | 1233 | } else { |
---|
.. | .. |
---|
1335 | 1313 | |
---|
1336 | 1314 | xpc_teardown_partitions(); |
---|
1337 | 1315 | out_1: |
---|
1338 | | - if (is_shub()) |
---|
1339 | | - xpc_exit_sn2(); |
---|
1340 | | - else if (is_uv()) |
---|
| 1316 | + if (is_uv_system()) |
---|
1341 | 1317 | xpc_exit_uv(); |
---|
1342 | 1318 | return ret; |
---|
1343 | 1319 | } |
---|
1344 | 1320 | |
---|
1345 | 1321 | module_init(xpc_init); |
---|
1346 | 1322 | |
---|
1347 | | -void __exit |
---|
| 1323 | +static void __exit |
---|
1348 | 1324 | xpc_exit(void) |
---|
1349 | 1325 | { |
---|
1350 | 1326 | xpc_do_exit(xpUnloading); |
---|