Commit 8f01515380 for qemu.org
commit 8f015153805a081039150509ff36c8a5798982bf
Author: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Date: Wed Jun 17 08:16:02 2026 +0200
exec/cpu-common.h: Avoid including unused 'tcg/debug-assert.h' header
Since commit efe25c260cd ("include/exec: Split out
accel/tcg/cpu-mmu-index.h") the "exec/cpu-common.h" isn't using
anything defined in "tcg/debug-assert.h".
Include it in target/loongarch/tcg/tcg_cpu.c however, where it
is required but included indirectly, otherwise we'd get:
target/loongarch/tcg/tcg_cpu.c:291:5: error: call to undeclared function 'tcg_debug_assert'
291 | tcg_debug_assert(!tcg_cflags_has(cs, CF_PCREL));
| ^
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20260617160426.64461-5-philmd@oss.qualcomm.com>
diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h
index 7dc8cab326..d1a0402536 100644
--- a/include/exec/cpu-common.h
+++ b/include/exec/cpu-common.h
@@ -10,7 +10,6 @@
#include "qemu/thread.h"
#include "hw/core/cpu.h"
-#include "tcg/debug-assert.h"
#include "exec/page-protection.h"
#define EXCP_INTERRUPT 0x10000 /* async interruption */
diff --git a/target/loongarch/tcg/tcg_cpu.c b/target/loongarch/tcg/tcg_cpu.c
index f556234d9d..83291c22c2 100644
--- a/target/loongarch/tcg/tcg_cpu.c
+++ b/target/loongarch/tcg/tcg_cpu.c
@@ -13,6 +13,7 @@
#include "accel/tcg/cpu-ops.h"
#include "exec/translation-block.h"
#include "exec/target_page.h"
+#include "tcg/debug-assert.h"
#include "tcg_loongarch.h"
#include "internals.h"