diff options
Diffstat (limited to 'dvalin/kernel/drivers/gpu/arm/midgard/mali_kbase_debug.h')
-rw-r--r-- | dvalin/kernel/drivers/gpu/arm/midgard/mali_kbase_debug.h | 79 |
1 files changed, 38 insertions, 41 deletions
diff --git a/dvalin/kernel/drivers/gpu/arm/midgard/mali_kbase_debug.h b/dvalin/kernel/drivers/gpu/arm/midgard/mali_kbase_debug.h index 2fdb72d..10a3c85 100644 --- a/dvalin/kernel/drivers/gpu/arm/midgard/mali_kbase_debug.h +++ b/dvalin/kernel/drivers/gpu/arm/midgard/mali_kbase_debug.h @@ -1,11 +1,12 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ /* * - * (C) COPYRIGHT 2012-2015, 2017 ARM Limited. All rights reserved. + * (C) COPYRIGHT 2012-2015, 2017, 2020-2021 ARM Limited. All rights reserved. * * This program is free software and is provided to you under the terms of the * GNU General Public License version 2 as published by the Free Software * Foundation, and any use by you of this program is subject to the terms - * of such GNU licence. + * of such GNU license. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -16,12 +17,8 @@ * along with this program; if not, you can access it online at * http://www.gnu.org/licenses/gpl-2.0.html. * - * SPDX-License-Identifier: GPL-2.0 - * */ - - #ifndef _KBASE_DEBUG_H #define _KBASE_DEBUG_H @@ -43,7 +40,7 @@ #endif /* KBASE_DEBUG_DISABLE_ASSERTS */ /** Function type that is called on an KBASE_DEBUG_ASSERT() or KBASE_DEBUG_ASSERT_MSG() */ -typedef void (kbase_debug_assert_hook) (void *); +typedef void kbase_debug_assert_hook(void *); struct kbasep_debug_assert_cb { kbase_debug_assert_hook *func; @@ -51,9 +48,9 @@ struct kbasep_debug_assert_cb { }; /** - * @def KBASEP_DEBUG_PRINT_TRACE - * @brief Private macro containing the format of the trace to display before every message - * @sa KBASE_DEBUG_SKIP_TRACE, KBASE_DEBUG_SKIP_FUNCTION_NAME + * KBASEP_DEBUG_PRINT_TRACE - Private macro containing the format of the trace + * to display before every message @sa KBASE_DEBUG_SKIP_TRACE, + * KBASE_DEBUG_SKIP_FUNCTION_NAME */ #if !KBASE_DEBUG_SKIP_TRACE #define KBASEP_DEBUG_PRINT_TRACE \ @@ -68,21 +65,22 @@ struct kbasep_debug_assert_cb { #endif /** - * @def KBASEP_DEBUG_ASSERT_OUT(trace, function, ...) - * @brief (Private) system printing function associated to the @ref KBASE_DEBUG_ASSERT_MSG event. - * @param trace location in the code from where the message is printed - * @param function function from where the message is printed - * @param ... Format string followed by format arguments. + * KBASEP_DEBUG_ASSERT_OUT(trace, function, ...) - (Private) system printing + * function associated to the @ref KBASE_DEBUG_ASSERT_MSG event. + * @trace: location in the code from where the message is printed + * @function: function from where the message is printed + * @...: Format string followed by format arguments. + * * @note function parameter cannot be concatenated with other strings */ /* Select the correct system output function*/ #ifdef CONFIG_MALI_DEBUG -#define KBASEP_DEBUG_ASSERT_OUT(trace, function, ...)\ - do { \ - pr_err("Mali<ASSERT>: %s function:%s ", trace, function);\ - pr_err(__VA_ARGS__);\ - pr_err("\n");\ - } while (false) +#define KBASEP_DEBUG_ASSERT_OUT(trace, function, ...) \ + do { \ + pr_err("Mali<ASSERT>: %s function:%s ", trace, function); \ + pr_err(__VA_ARGS__); \ + pr_err("\n"); \ + } while (false) #else #define KBASEP_DEBUG_ASSERT_OUT(trace, function, ...) CSTD_NOP() #endif @@ -94,12 +92,12 @@ struct kbasep_debug_assert_cb { #endif /** - * @def KBASE_DEBUG_ASSERT(expr) - * @brief Calls @ref KBASE_PRINT_ASSERT and prints the expression @a expr if @a expr is false + * KBASE_DEBUG_ASSERT(expr) - Calls @ref KBASE_PRINT_ASSERT and prints the + * expression @a expr if @a expr is false + * @expr: Boolean expression * * @note This macro does nothing if the flag @ref KBASE_DEBUG_DISABLE_ASSERTS is set to 1 * - * @param expr Boolean expression */ #define KBASE_DEBUG_ASSERT(expr) \ KBASE_DEBUG_ASSERT_MSG(expr, #expr) @@ -107,15 +105,15 @@ struct kbasep_debug_assert_cb { #if KBASE_DEBUG_DISABLE_ASSERTS #define KBASE_DEBUG_ASSERT_MSG(expr, ...) CSTD_NOP() #else - /** - * @def KBASE_DEBUG_ASSERT_MSG(expr, ...) - * @brief Calls @ref KBASEP_DEBUG_ASSERT_OUT and prints the given message if @a expr is false - * - * @note This macro does nothing if the flag @ref KBASE_DEBUG_DISABLE_ASSERTS is set to 1 - * - * @param expr Boolean expression - * @param ... Message to display when @a expr is false, as a format string followed by format arguments. - */ +/** + * KBASE_DEBUG_ASSERT_MSG() - Calls @ref KBASEP_DEBUG_ASSERT_OUT and prints the + * given message if @a expr is false + * @expr: Boolean expression + * @...: Message to display when @a expr is false, as a format string followed + * by format arguments. + * + * This macro does nothing if the flag KBASE_DEBUG_DISABLE_ASSERTS is set to 1 + */ #define KBASE_DEBUG_ASSERT_MSG(expr, ...) \ do { \ if (!(expr)) { \ @@ -127,10 +125,8 @@ struct kbasep_debug_assert_cb { #endif /* KBASE_DEBUG_DISABLE_ASSERTS */ /** - * @def KBASE_DEBUG_CODE( X ) - * @brief Executes the code inside the macro only in debug mode - * - * @param X Code to compile only in debug mode. + * KBASE_DEBUG_CODE( X ) - Executes the code inside the macro only in debug mode + * @X: Code to compile only in debug mode. */ #ifdef CONFIG_MALI_DEBUG #define KBASE_DEBUG_CODE(X) X @@ -141,7 +137,9 @@ struct kbasep_debug_assert_cb { /** @} */ /** - * @brief Register a function to call on ASSERT + * kbase_debug_assert_register_hook - Register a function to call on ASSERT + * @func: the function to call when an assert is triggered. + * @param: the parameter to pass to \a func when calling it * * Such functions will \b only be called during Debug mode, and for debugging * features \b only. Do not rely on them to be called in general use. @@ -151,13 +149,12 @@ struct kbasep_debug_assert_cb { * @note This function is not thread-safe, and should only be used to * register/deregister once in the module's lifetime. * - * @param[in] func the function to call when an assert is triggered. - * @param[in] param the parameter to pass to \a func when calling it */ void kbase_debug_assert_register_hook(kbase_debug_assert_hook *func, void *param); /** - * @brief Call a debug assert hook previously registered with kbase_debug_assert_register_hook() + * kbasep_debug_assert_call_hook - Call a debug assert hook previously + * registered with kbase_debug_assert_register_hook() * * @note This function is not thread-safe with respect to multiple threads * registering functions and parameters with |