hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/misc/sgi-xp/xpc_main.c
....@@ -3,6 +3,7 @@
33 * License. See the file "COPYING" in the main directory of this archive
44 * for more details.
55 *
6
+ * (C) Copyright 2020 Hewlett Packard Enterprise Development LP
67 * Copyright (c) 2004-2009 Silicon Graphics, Inc. All Rights Reserved.
78 */
89
....@@ -59,16 +60,16 @@
5960
6061 /* define two XPC debug device structures to be used with dev_dbg() et al */
6162
62
-struct device_driver xpc_dbg_name = {
63
+static struct device_driver xpc_dbg_name = {
6364 .name = "xpc"
6465 };
6566
66
-struct device xpc_part_dbg_subname = {
67
+static struct device xpc_part_dbg_subname = {
6768 .init_name = "", /* set to "part" at xpc_init() time */
6869 .driver = &xpc_dbg_name
6970 };
7071
71
-struct device xpc_chan_dbg_subname = {
72
+static struct device xpc_chan_dbg_subname = {
7273 .init_name = "", /* set to "chan" at xpc_init() time */
7374 .driver = &xpc_dbg_name
7475 };
....@@ -279,13 +280,6 @@
279280
280281 dev_dbg(xpc_part, "checking remote heartbeats\n");
281282 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;
289283 }
290284
291285 /* check for outstanding IRQs */
....@@ -1050,9 +1044,7 @@
10501044
10511045 xpc_teardown_partitions();
10521046
1053
- if (is_shub())
1054
- xpc_exit_sn2();
1055
- else if (is_uv())
1047
+ if (is_uv_system())
10561048 xpc_exit_uv();
10571049 }
10581050
....@@ -1182,7 +1174,7 @@
11821174 if (!xpc_kdebug_ignore)
11831175 break;
11841176
1185
- /* fall through */
1177
+ fallthrough;
11861178 case DIE_MCA_MONARCH_ENTER:
11871179 case DIE_INIT_MONARCH_ENTER:
11881180 xpc_arch_ops.offline_heartbeat();
....@@ -1193,7 +1185,7 @@
11931185 if (!xpc_kdebug_ignore)
11941186 break;
11951187
1196
- /* fall through */
1188
+ fallthrough;
11971189 case DIE_MCA_MONARCH_LEAVE:
11981190 case DIE_INIT_MONARCH_LEAVE:
11991191 xpc_arch_ops.online_heartbeat();
....@@ -1226,7 +1218,7 @@
12261218 return NOTIFY_DONE;
12271219 }
12281220
1229
-int __init
1221
+static int __init
12301222 xpc_init(void)
12311223 {
12321224 int ret;
....@@ -1235,21 +1227,7 @@
12351227 dev_set_name(xpc_part, "part");
12361228 dev_set_name(xpc_chan, "chan");
12371229
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()) {
12531231 ret = xpc_init_uv();
12541232
12551233 } else {
....@@ -1335,16 +1313,14 @@
13351313
13361314 xpc_teardown_partitions();
13371315 out_1:
1338
- if (is_shub())
1339
- xpc_exit_sn2();
1340
- else if (is_uv())
1316
+ if (is_uv_system())
13411317 xpc_exit_uv();
13421318 return ret;
13431319 }
13441320
13451321 module_init(xpc_init);
13461322
1347
-void __exit
1323
+static void __exit
13481324 xpc_exit(void)
13491325 {
13501326 xpc_do_exit(xpUnloading);