diff options
Diffstat (limited to 'mali_kbase/context/mali_kbase_context.h')
-rw-r--r-- | mali_kbase/context/mali_kbase_context.h | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/mali_kbase/context/mali_kbase_context.h b/mali_kbase/context/mali_kbase_context.h index 22cb00c..e2295d0 100644 --- a/mali_kbase/context/mali_kbase_context.h +++ b/mali_kbase/context/mali_kbase_context.h @@ -66,11 +66,10 @@ void kbase_context_debugfs_term(struct kbase_context *const kctx); * * Return: new kbase context or NULL on failure */ -struct kbase_context * -kbase_create_context(struct kbase_device *kbdev, bool is_compat, - base_context_create_flags const flags, - unsigned long api_version, - struct kbase_file *const kfile); +struct kbase_context *kbase_create_context(struct kbase_device *kbdev, bool is_compat, + base_context_create_flags const flags, + unsigned long api_version, + struct kbase_file *const kfile); /** * kbase_destroy_context - Destroy a kernel base context. @@ -87,10 +86,9 @@ void kbase_destroy_context(struct kbase_context *kctx); * * Return: true if @flag is set on @kctx, false if not. */ -static inline bool kbase_ctx_flag(struct kbase_context *kctx, - enum kbase_context_flags flag) +static inline bool kbase_ctx_flag(struct kbase_context *kctx, enum kbase_context_flags flag) { - return atomic_read(&kctx->flags) & flag; + return atomic_read(&kctx->flags) & (int)flag; } /** @@ -100,11 +98,7 @@ static inline bool kbase_ctx_flag(struct kbase_context *kctx, * * Return: True if needs to maintain compatibility, False otherwise. */ -static inline bool kbase_ctx_compat_mode(struct kbase_context *kctx) -{ - return !IS_ENABLED(CONFIG_64BIT) || - (IS_ENABLED(CONFIG_64BIT) && kbase_ctx_flag(kctx, KCTX_COMPAT)); -} +bool kbase_ctx_compat_mode(struct kbase_context *kctx); /** * kbase_ctx_flag_clear - Clear @flag on @kctx @@ -117,8 +111,7 @@ static inline bool kbase_ctx_compat_mode(struct kbase_context *kctx) * Some flags have locking requirements, check the documentation for the * respective flags. */ -static inline void kbase_ctx_flag_clear(struct kbase_context *kctx, - enum kbase_context_flags flag) +static inline void kbase_ctx_flag_clear(struct kbase_context *kctx, enum kbase_context_flags flag) { atomic_andnot(flag, &kctx->flags); } @@ -134,8 +127,7 @@ static inline void kbase_ctx_flag_clear(struct kbase_context *kctx, * Some flags have locking requirements, check the documentation for the * respective flags. */ -static inline void kbase_ctx_flag_set(struct kbase_context *kctx, - enum kbase_context_flags flag) +static inline void kbase_ctx_flag_set(struct kbase_context *kctx, enum kbase_context_flags flag) { atomic_or(flag, &kctx->flags); } |