| .. | .. |
|---|
| 1 | 1 | // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note |
|---|
| 2 | 2 | /* |
|---|
| 3 | 3 | * |
|---|
| 4 | | - * (C) COPYRIGHT 2010-2021 ARM Limited. All rights reserved. |
|---|
| 4 | + * (C) COPYRIGHT 2010-2022 ARM Limited. All rights reserved. |
|---|
| 5 | 5 | * |
|---|
| 6 | 6 | * This program is free software and is provided to you under the terms of the |
|---|
| 7 | 7 | * GNU General Public License version 2 as published by the Free Software |
|---|
| .. | .. |
|---|
| 82 | 82 | |
|---|
| 83 | 83 | #endif |
|---|
| 84 | 84 | /* 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 | + */ |
|---|
| 88 | 88 | kctx->gwt_enabled = true; |
|---|
| 89 | 89 | kctx->gwt_was_enabled = true; |
|---|
| 90 | 90 | |
|---|
| .. | .. |
|---|
| 125 | 125 | return 0; |
|---|
| 126 | 126 | } |
|---|
| 127 | 127 | |
|---|
| 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 |
|---|
| 129 | 131 | static int list_cmp_function(void *priv, struct list_head *a, |
|---|
| 130 | 132 | struct list_head *b) |
|---|
| 133 | +#endif |
|---|
| 131 | 134 | { |
|---|
| 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); |
|---|
| 136 | 139 | |
|---|
| 137 | 140 | CSTD_UNUSED(priv); |
|---|
| 138 | 141 | |
|---|