]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
target-info: Move TARGET_PAGE_BITS sanity check
authorRichard Henderson <richard.henderson@linaro.org>
Tue, 17 Feb 2026 09:51:02 +0000 (19:51 +1000)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Wed, 25 Feb 2026 23:11:26 +0000 (00:11 +0100)
Move the check from page-vary-target.c to target-info-stub.c,
in the process of removing page-vary-target.c entirely.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20260217095106.598486-4-richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
page-vary-target.c
target-info-stub.c

index ab92da4539db8c1b44ffd3e30703318118d3d0a6..7c0565dd8dc7e35f2ff026e1d69f6577a10ff3e9 100644 (file)
 #include "exec/page-vary.h"
 #include "exec/target_page.h"
 
-#ifndef TARGET_PAGE_BITS_VARY
-QEMU_BUILD_BUG_ON(TARGET_PAGE_BITS < TARGET_PAGE_BITS_MIN);
-#endif
-
 #ifndef CONFIG_USER_ONLY
 #include "exec/tlb-flags.h"
 
index 896f16e582b9297681a55ae9cab3700a2318ac6d..f5896a72621df67a2278c0a9140e6135363ebccf 100644 (file)
 #include "qemu/target-info-impl.h"
 #include "hw/core/boards.h"
 #include "cpu.h"
+#include "exec/page-vary.h"
 
 /* Validate correct placement of CPUArchState. */
 QEMU_BUILD_BUG_ON(offsetof(ArchCPU, parent_obj) != 0);
 QEMU_BUILD_BUG_ON(offsetof(ArchCPU, env) != sizeof(CPUState));
 
+/* Validate target page size, if invariant. */
+#ifndef TARGET_PAGE_BITS_VARY
+QEMU_BUILD_BUG_ON(TARGET_PAGE_BITS < TARGET_PAGE_BITS_MIN);
+#endif
+
 static const TargetInfo target_info_stub = {
     .target_name = TARGET_NAME,
     .target_arch = glue(SYS_EMU_TARGET_, TARGET_ARCH),