hc
2023-12-06 08f87f769b595151be1afeff53e144f543faa614
kernel/drivers/gpu/arm/bifrost/mali_kbase_gwt.c
....@@ -1,7 +1,7 @@
11 // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
22 /*
33 *
4
- * (C) COPYRIGHT 2010-2021 ARM Limited. All rights reserved.
4
+ * (C) COPYRIGHT 2010-2022 ARM Limited. All rights reserved.
55 *
66 * This program is free software and is provided to you under the terms of the
77 * GNU General Public License version 2 as published by the Free Software
....@@ -82,9 +82,9 @@
8282
8383 #endif
8484 /* Mark gwt enabled before making pages read only in case a
85
- write page fault is triggered while we're still in this loop.
86
- (kbase_gpu_vm_lock() doesn't prevent this!)
87
- */
85
+ * write page fault is triggered while we're still in this loop.
86
+ * (kbase_gpu_vm_lock() doesn't prevent this!)
87
+ */
8888 kctx->gwt_enabled = true;
8989 kctx->gwt_was_enabled = true;
9090
....@@ -125,14 +125,17 @@
125125 return 0;
126126 }
127127
128
-
128
+#if (KERNEL_VERSION(5, 13, 0) <= LINUX_VERSION_CODE)
129
+static int list_cmp_function(void *priv, const struct list_head *a, const struct list_head *b)
130
+#else
129131 static int list_cmp_function(void *priv, struct list_head *a,
130132 struct list_head *b)
133
+#endif
131134 {
132
- struct kbasep_gwt_list_element *elementA = container_of(a,
133
- struct kbasep_gwt_list_element, link);
134
- struct kbasep_gwt_list_element *elementB = container_of(b,
135
- struct kbasep_gwt_list_element, link);
135
+ const struct kbasep_gwt_list_element *elementA =
136
+ container_of(a, struct kbasep_gwt_list_element, link);
137
+ const struct kbasep_gwt_list_element *elementB =
138
+ container_of(b, struct kbasep_gwt_list_element, link);
136139
137140 CSTD_UNUSED(priv);
138141