| .. | .. |
|---|
| 1 | 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ |
|---|
| 2 | 2 | /* |
|---|
| 3 | 3 | * |
|---|
| 4 | | - * (C) COPYRIGHT 2011-2017, 2019-2021 ARM Limited. All rights reserved. |
|---|
| 4 | + * (C) COPYRIGHT 2011-2023 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 |
|---|
| .. | .. |
|---|
| 93 | 93 | } |
|---|
| 94 | 94 | |
|---|
| 95 | 95 | /** |
|---|
| 96 | + * kbase_ctx_compat_mode - Indicate whether a kbase context needs to operate |
|---|
| 97 | + * in compatibility mode for 32-bit userspace. |
|---|
| 98 | + * @kctx: kbase context |
|---|
| 99 | + * |
|---|
| 100 | + * Return: True if needs to maintain compatibility, False otherwise. |
|---|
| 101 | + */ |
|---|
| 102 | +static inline bool kbase_ctx_compat_mode(struct kbase_context *kctx) |
|---|
| 103 | +{ |
|---|
| 104 | + return !IS_ENABLED(CONFIG_64BIT) || |
|---|
| 105 | + (IS_ENABLED(CONFIG_64BIT) && kbase_ctx_flag(kctx, KCTX_COMPAT)); |
|---|
| 106 | +} |
|---|
| 107 | + |
|---|
| 108 | +/** |
|---|
| 96 | 109 | * kbase_ctx_flag_clear - Clear @flag on @kctx |
|---|
| 97 | 110 | * @kctx: Pointer to kbase context |
|---|
| 98 | 111 | * @flag: Flag to clear |
|---|