hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/misc/sgi-xp/xpc_partition.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-2008 Silicon Graphics, Inc. All Rights Reserved.
78 */
89
....@@ -93,13 +94,8 @@
9394 if (ret != xpNeedMoreInfo)
9495 break;
9596
96
- /* !!! L1_CACHE_ALIGN() is only a sn2-bte_copy requirement */
97
- if (is_shub())
98
- len = L1_CACHE_ALIGN(len);
99
-
10097 if (len > buf_len) {
101
- if (buf_base != NULL)
102
- kfree(buf_base);
98
+ kfree(buf_base);
10399 buf_len = L1_CACHE_ALIGN(len);
104100 buf = xpc_kmalloc_cacheline_aligned(buf_len, GFP_KERNEL,
105101 &buf_base);
....@@ -438,7 +434,7 @@
438434 */
439435 region_size = xp_region_size;
440436
441
- if (is_uv())
437
+ if (is_uv_system())
442438 max_regions = 256;
443439 else {
444440 max_regions = 64;
....@@ -446,14 +442,13 @@
446442 switch (region_size) {
447443 case 128:
448444 max_regions *= 2;
449
- /* fall through */
445
+ fallthrough;
450446 case 64:
451447 max_regions *= 2;
452
- /* fall through */
448
+ fallthrough;
453449 case 32:
454450 max_regions *= 2;
455451 region_size = 16;
456
- DBUG_ON(!is_shub2());
457452 }
458453 }
459454