| .. | .. |
|---|
| 1 | 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ |
|---|
| 2 | 2 | /* |
|---|
| 3 | 3 | * |
|---|
| 4 | | - * (C) COPYRIGHT 2017-2018, 2020-2021 ARM Limited. All rights reserved. |
|---|
| 4 | + * (C) COPYRIGHT 2017-2018, 2020-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 |
|---|
| .. | .. |
|---|
| 60 | 60 | void kbase_ctx_sched_term(struct kbase_device *kbdev); |
|---|
| 61 | 61 | |
|---|
| 62 | 62 | /** |
|---|
| 63 | + * kbase_ctx_sched_ctx_init - Initialize per-context data fields for scheduling |
|---|
| 64 | + * @kctx: The context to initialize |
|---|
| 65 | + * |
|---|
| 66 | + * This must be called during context initialization before any other context |
|---|
| 67 | + * scheduling functions are called on @kctx |
|---|
| 68 | + */ |
|---|
| 69 | +void kbase_ctx_sched_init_ctx(struct kbase_context *kctx); |
|---|
| 70 | + |
|---|
| 71 | +/** |
|---|
| 63 | 72 | * kbase_ctx_sched_retain_ctx - Retain a reference to the @ref kbase_context |
|---|
| 64 | 73 | * @kctx: The context to which to retain a reference |
|---|
| 65 | 74 | * |
|---|
| .. | .. |
|---|
| 79 | 88 | int kbase_ctx_sched_retain_ctx(struct kbase_context *kctx); |
|---|
| 80 | 89 | |
|---|
| 81 | 90 | /** |
|---|
| 82 | | - * kbase_ctx_sched_retain_ctx_refcount |
|---|
| 91 | + * kbase_ctx_sched_retain_ctx_refcount - Retain a reference to the @ref kbase_context |
|---|
| 83 | 92 | * @kctx: The context to which to retain a reference |
|---|
| 84 | 93 | * |
|---|
| 85 | 94 | * This function only retains a reference to the context. It must be called |
|---|
| .. | .. |
|---|
| 113 | 122 | * This function should be called when a context is being destroyed. The |
|---|
| 114 | 123 | * context must no longer have any reference. If it has been assigned an |
|---|
| 115 | 124 | * address space before then the AS will be unprogrammed. |
|---|
| 116 | | - * |
|---|
| 117 | | - * The kbase_device::mmu_hw_mutex and kbase_device::hwaccess_lock locks must be |
|---|
| 118 | | - * held whilst calling this function. |
|---|
| 119 | 125 | */ |
|---|
| 120 | 126 | void kbase_ctx_sched_remove_ctx(struct kbase_context *kctx); |
|---|
| 121 | 127 | |
|---|
| .. | .. |
|---|
| 187 | 193 | * @kctx: Context to be refcounted |
|---|
| 188 | 194 | * |
|---|
| 189 | 195 | * The following locks must be held by the caller: |
|---|
| 190 | | - * * kbase_device::mmu_hw_mutex |
|---|
| 191 | | - * * kbase_device::hwaccess_lock |
|---|
| 196 | + * &kbase_device.mmu_hw_mutex |
|---|
| 197 | + * &kbase_device.hwaccess_lock |
|---|
| 192 | 198 | * |
|---|
| 193 | 199 | * Return: true if refcount succeeded, and the context will not be scheduled |
|---|
| 194 | 200 | * out, false if the refcount failed (because the context is being/has been |
|---|