mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-10 11:59:48 +00:00
[WHY & HOW] - Move SPL from dc/spl to dc/sspl - Update build files and header paths - Remove dc/spl files Reviewed-by: George Zhang <george.zhang@amd.com> Signed-off-by: Samson Tam <Samson.Tam@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
31 lines
675 B
C
31 lines
675 B
C
/* SPDX-License-Identifier: MIT */
|
|
|
|
/* Copyright 2024 Advanced Micro Devices, Inc. */
|
|
|
|
#ifndef SPL_DEBUG_H
|
|
#define SPL_DEBUG_H
|
|
|
|
#if defined(CONFIG_HAVE_KGDB) || defined(CONFIG_KGDB)
|
|
#define SPL_ASSERT_CRITICAL(expr) do { \
|
|
if (WARN_ON(!(expr))) { \
|
|
kgdb_breakpoint(); \
|
|
} \
|
|
} while (0)
|
|
#else
|
|
#define SPL_ASSERT_CRITICAL(expr) do { \
|
|
if (WARN_ON(!(expr))) { \
|
|
; \
|
|
} \
|
|
} while (0)
|
|
#endif /* CONFIG_HAVE_KGDB || CONFIG_KGDB */
|
|
|
|
#if defined(CONFIG_DEBUG_KERNEL_DC)
|
|
#define SPL_ASSERT(expr) SPL_ASSERT_CRITICAL(expr)
|
|
#else
|
|
#define SPL_ASSERT(expr) WARN_ON(!(expr))
|
|
#endif /* CONFIG_DEBUG_KERNEL_DC */
|
|
|
|
#define SPL_BREAK_TO_DEBUGGER() SPL_ASSERT(0)
|
|
|
|
#endif // SPL_DEBUG_H
|