From patchwork Thu Dec 12 14:44:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 13905287 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6B27CE7717F for ; Thu, 12 Dec 2024 14:45:18 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tLkQl-0007ou-Ks; Thu, 12 Dec 2024 09:44:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tLkQk-0007od-DM for qemu-devel@nongnu.org; Thu, 12 Dec 2024 09:44:42 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tLkQi-0004DW-8D for qemu-devel@nongnu.org; Thu, 12 Dec 2024 09:44:42 -0500 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-4361a50e337so5041035e9.0 for ; Thu, 12 Dec 2024 06:44:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734014678; x=1734619478; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Qp4hT6KANxF5mFm0n9MmO+6Us3wInf0FaD8+gtby53Q=; b=LqUp9Tkm2BWPVAqM4wuaekHbcpWBpCJMNOBZ3ffMXxcXPr1Kd+2aP3PImUPW6cqZTT NJN1eHdriQ1XXZGY3rf6wUYr8OgJizJV8p1RzK2KBudaV4UisTV2w6js0TS3eCf7bb0c KkrJOKi+4boX/nyQP4LLoP+V8MoXyfnkhjbMd2jEtOHbQi39uG1A0dfF/B6UIAk4WCQ/ mlDurHE+oMtqw4BALDbaB6IzFA+bd1/THYrB114tWKPgGobj+9/YyuVptWJi2DvHW7x8 jo3oA9bTOWqj7VZKGsNkJyJ3218X62oERdPHyvcl34EDB2uEkWXe8Bdvb4bwlb2McZKl GrDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734014678; x=1734619478; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Qp4hT6KANxF5mFm0n9MmO+6Us3wInf0FaD8+gtby53Q=; b=E0zdOhWY5/TcfY+HE56kqc4wNGYKHVCyoCbSmjCuVUEisgCRUzDAwzI4OtyvEzUzdW PA7nEdZ5vL3AKZ4IH7vMU9x/xoNammw0XDGklnd4jU/4hlarVLQIpNmKWljzjo6YVpFQ H1n5d3hpleQpgnxJ9C+G8lIp+PoLs3cIqgGFe5fmTx6movuy3Ccm9tN+yRQpr13LgumF wJu3AHbXnB28eHl8gxtk4Olr456m/XMi5osIr4AMhmEs8fdpijBbuJkXEad00e2fhMQO fzE6rrxbm8OuG+4XMV7GhBFbVHOzigwyrAs1w2gbMwL9M19RwR+5By7Z+2i4m1gY/WQB cFCQ== X-Gm-Message-State: AOJu0Yyc335a7GrseDhYtb2qESFhlMZvKDlXA0Y0xdVTl6/32+brecGM X//30v5aocmP0S5Rikn9lDU8ssxN+9xPhgK223CgC2z+PSG4PfOuEwYyj+yrfa8un9BAkdHGMUl W X-Gm-Gg: ASbGncubTzwXdV60JQUrnBtFatSXDcSP5TC5DWzQmqU99m0gCON8YO5Ct7bF8uxey1u YaLEtrUTZPVaK0Wq3HaxdsL4M4MU7I/qjPC+VtP1SSSeJMAPH10kq/x9Wl5yt/UzUDKRax2BJ+L tjNiVoR2RFUM4RqzQQLrYSNEY+BCJ62mZJdpI1YWuUJLRtBYGGjXacgBItbDlei1MMZNV59eyk4 tpE1N4pmK1nHIbeo76FNPsGHzUnepKavyfSgabItRUkCb+MROXxbX1MBXf59hg/PeU8CR3skpFj xXHuA0hdz3X8gAiOSDsZMVs7++U5kKc= X-Google-Smtp-Source: AGHT+IFh/YaZ++JtIjDPk2cfA3YL/zyL8e1m63PpvjniXfw0rBm+zZcWTFGrg6yP/b3zhLIUhHgRkg== X-Received: by 2002:a05:600c:1c14:b0:434:ff9d:a3a1 with SMTP id 5b1f17b1804b1-4361c396c09mr59484235e9.2.1734014677700; Thu, 12 Dec 2024 06:44:37 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38782514e86sm4274742f8f.72.2024.12.12.06.44.36 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 12 Dec 2024 06:44:36 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= Subject: [PATCH v2 1/2] accel/tcg: Move tcg_cflags_has/set() to 'exec/translation-block.h' Date: Thu, 12 Dec 2024 15:44:29 +0100 Message-ID: <20241212144430.66224-2-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241212144430.66224-1-philmd@linaro.org> References: <20241212144430.66224-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=philmd@linaro.org; helo=mail-wm1-x329.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org The TranslationBlock flags are defined in 'exec/translation-block.h'. tcg_cflags_has/set() and curr_cflags() use them, it is more logical to declare them in the same place. Move them there too. Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- include/exec/cpu-common.h | 6 ------ include/exec/translation-block.h | 6 ++++++ accel/tcg/cpu-exec.c | 1 + accel/tcg/tcg-accel-ops.c | 1 + accel/tcg/watchpoint.c | 1 + linux-user/mmap.c | 1 + linux-user/syscall.c | 1 + target/arm/cpu.c | 1 + target/avr/cpu.c | 1 + target/hexagon/cpu.c | 1 + target/hppa/cpu.c | 1 + target/i386/cpu.c | 1 + target/i386/helper.c | 1 + target/loongarch/cpu.c | 1 + target/microblaze/cpu.c | 1 + target/mips/tcg/exception.c | 1 + target/mips/tcg/sysemu/special_helper.c | 1 + target/openrisc/cpu.c | 1 + target/riscv/tcg/tcg-cpu.c | 1 + target/rx/cpu.c | 1 + target/sh4/cpu.c | 1 + target/sparc/cpu.c | 1 + target/tricore/cpu.c | 1 + 23 files changed, 27 insertions(+), 6 deletions(-) diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h index 638dc806a5f..bdeb9d68f32 100644 --- a/include/exec/cpu-common.h +++ b/include/exec/cpu-common.h @@ -187,12 +187,6 @@ void list_cpus(void); #ifdef CONFIG_TCG -bool tcg_cflags_has(CPUState *cpu, uint32_t flags); -void tcg_cflags_set(CPUState *cpu, uint32_t flags); - -/* current cflags for hashing/comparison */ -uint32_t curr_cflags(CPUState *cpu); - /** * cpu_unwind_state_data: * @cpu: the cpu context diff --git a/include/exec/translation-block.h b/include/exec/translation-block.h index b99afb00779..c1e48a48aab 100644 --- a/include/exec/translation-block.h +++ b/include/exec/translation-block.h @@ -153,4 +153,10 @@ static inline uint32_t tb_cflags(const TranslationBlock *tb) return qatomic_read(&tb->cflags); } +bool tcg_cflags_has(CPUState *cpu, uint32_t flags); +void tcg_cflags_set(CPUState *cpu, uint32_t flags); + +/* current cflags for hashing/comparison */ +uint32_t curr_cflags(CPUState *cpu); + #endif /* EXEC_TRANSLATION_BLOCK_H */ diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index c13f4a7cbbf..91e742933fa 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -25,6 +25,7 @@ #include "trace.h" #include "disas/disas.h" #include "exec/exec-all.h" +#include "exec/translation-block.h" #include "tcg/tcg.h" #include "qemu/atomic.h" #include "qemu/rcu.h" diff --git a/accel/tcg/tcg-accel-ops.c b/accel/tcg/tcg-accel-ops.c index d9a35b7667c..6e3f1fa92b2 100644 --- a/accel/tcg/tcg-accel-ops.c +++ b/accel/tcg/tcg-accel-ops.c @@ -35,6 +35,7 @@ #include "exec/exec-all.h" #include "exec/hwaddr.h" #include "exec/tb-flush.h" +#include "exec/translation-block.h" #include "gdbstub/enums.h" #include "hw/core/cpu.h" diff --git a/accel/tcg/watchpoint.c b/accel/tcg/watchpoint.c index ca641eb95cf..facff4175a8 100644 --- a/accel/tcg/watchpoint.c +++ b/accel/tcg/watchpoint.c @@ -22,6 +22,7 @@ #include "qemu/error-report.h" #include "exec/exec-all.h" #include "exec/translate-all.h" +#include "exec/translation-block.h" #include "system/tcg.h" #include "system/replay.h" #include "hw/core/tcg-cpu-ops.h" diff --git a/linux-user/mmap.c b/linux-user/mmap.c index e4bf5d5f39c..a2f8766b5c6 100644 --- a/linux-user/mmap.c +++ b/linux-user/mmap.c @@ -21,6 +21,7 @@ #include "trace.h" #include "exec/log.h" #include "exec/page-protection.h" +#include "exec/translation-block.h" #include "qemu.h" #include "user-internals.h" #include "user-mmap.h" diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 1ce4c79784f..5830014b657 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -26,6 +26,7 @@ #include "tcg/startup.h" #include "target_mman.h" #include "exec/page-protection.h" +#include "exec/translation-block.h" #include #include #include diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 237f35c861a..e5be73d420a 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -28,6 +28,7 @@ #include "qapi/error.h" #include "cpu.h" #ifdef CONFIG_TCG +#include "exec/translation-block.h" #include "hw/core/tcg-cpu-ops.h" #endif /* CONFIG_TCG */ #include "internals.h" diff --git a/target/avr/cpu.c b/target/avr/cpu.c index 3132842d565..dda63f913ca 100644 --- a/target/avr/cpu.c +++ b/target/avr/cpu.c @@ -22,6 +22,7 @@ #include "qapi/error.h" #include "qemu/qemu-print.h" #include "exec/exec-all.h" +#include "exec/translation-block.h" #include "cpu.h" #include "disas/dis-asm.h" #include "tcg/debug-assert.h" diff --git a/target/hexagon/cpu.c b/target/hexagon/cpu.c index 020038fc490..489d68dc50e 100644 --- a/target/hexagon/cpu.c +++ b/target/hexagon/cpu.c @@ -20,6 +20,7 @@ #include "cpu.h" #include "internal.h" #include "exec/exec-all.h" +#include "exec/translation-block.h" #include "qapi/error.h" #include "hw/qdev-properties.h" #include "fpu/softfloat-helpers.h" diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c index c38439c1800..c9062e60b67 100644 --- a/target/hppa/cpu.c +++ b/target/hppa/cpu.c @@ -25,6 +25,7 @@ #include "cpu.h" #include "qemu/module.h" #include "exec/exec-all.h" +#include "exec/translation-block.h" #include "fpu/softfloat.h" #include "tcg/tcg.h" diff --git a/target/i386/cpu.c b/target/i386/cpu.c index c5edf58421d..8bbf914c579 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -24,6 +24,7 @@ #include "qemu/hw-version.h" #include "cpu.h" #include "tcg/helper-tcg.h" +#include "exec/translation-block.h" #include "system/hvf.h" #include "hvf/hvf-i386.h" #include "kvm/kvm_i386.h" diff --git a/target/i386/helper.c b/target/i386/helper.c index a78d06c95ba..3bc15fba6ee 100644 --- a/target/i386/helper.c +++ b/target/i386/helper.c @@ -21,6 +21,7 @@ #include "qapi/qapi-events-run-state.h" #include "cpu.h" #include "exec/exec-all.h" +#include "exec/translation-block.h" #include "system/runstate.h" #ifndef CONFIG_USER_ONLY #include "system/hw_accel.h" diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c index 078766feafc..dfdd1f78602 100644 --- a/target/loongarch/cpu.c +++ b/target/loongarch/cpu.c @@ -15,6 +15,7 @@ #include "system/kvm.h" #include "kvm/kvm_loongarch.h" #include "exec/exec-all.h" +#include "exec/translation-block.h" #include "cpu.h" #include "internals.h" #include "fpu/softfloat-helpers.h" diff --git a/target/microblaze/cpu.c b/target/microblaze/cpu.c index 710eb1146c1..a5658f1aae0 100644 --- a/target/microblaze/cpu.c +++ b/target/microblaze/cpu.c @@ -30,6 +30,7 @@ #include "exec/exec-all.h" #include "exec/cpu_ldst.h" #include "exec/gdbstub.h" +#include "exec/translation-block.h" #include "fpu/softfloat-helpers.h" #include "tcg/tcg.h" diff --git a/target/mips/tcg/exception.c b/target/mips/tcg/exception.c index 4886d087b2e..1a8902ea1bc 100644 --- a/target/mips/tcg/exception.c +++ b/target/mips/tcg/exception.c @@ -24,6 +24,7 @@ #include "internal.h" #include "exec/helper-proto.h" #include "exec/exec-all.h" +#include "exec/translation-block.h" target_ulong exception_resume_pc(CPUMIPSState *env) { diff --git a/target/mips/tcg/sysemu/special_helper.c b/target/mips/tcg/sysemu/special_helper.c index 9ce5e2ceac5..3ce3ae1e124 100644 --- a/target/mips/tcg/sysemu/special_helper.c +++ b/target/mips/tcg/sysemu/special_helper.c @@ -23,6 +23,7 @@ #include "cpu.h" #include "exec/helper-proto.h" #include "exec/exec-all.h" +#include "exec/translation-block.h" #include "internal.h" /* Specials */ diff --git a/target/openrisc/cpu.c b/target/openrisc/cpu.c index b96561d1f26..c11a09cd062 100644 --- a/target/openrisc/cpu.c +++ b/target/openrisc/cpu.c @@ -22,6 +22,7 @@ #include "qemu/qemu-print.h" #include "cpu.h" #include "exec/exec-all.h" +#include "exec/translation-block.h" #include "fpu/softfloat-helpers.h" #include "tcg/tcg.h" diff --git a/target/riscv/tcg/tcg-cpu.c b/target/riscv/tcg/tcg-cpu.c index c62c2216961..958b8c89cbf 100644 --- a/target/riscv/tcg/tcg-cpu.c +++ b/target/riscv/tcg/tcg-cpu.c @@ -19,6 +19,7 @@ #include "qemu/osdep.h" #include "exec/exec-all.h" +#include "exec/translation-block.h" #include "tcg-cpu.h" #include "cpu.h" #include "internals.h" diff --git a/target/rx/cpu.c b/target/rx/cpu.c index 65a74ce720f..945ae6e9e50 100644 --- a/target/rx/cpu.c +++ b/target/rx/cpu.c @@ -23,6 +23,7 @@ #include "migration/vmstate.h" #include "exec/exec-all.h" #include "exec/page-protection.h" +#include "exec/translation-block.h" #include "hw/loader.h" #include "fpu/softfloat.h" #include "tcg/debug-assert.h" diff --git a/target/sh4/cpu.c b/target/sh4/cpu.c index 8f07261dcfd..2a51d9e35c7 100644 --- a/target/sh4/cpu.c +++ b/target/sh4/cpu.c @@ -25,6 +25,7 @@ #include "cpu.h" #include "migration/vmstate.h" #include "exec/exec-all.h" +#include "exec/translation-block.h" #include "fpu/softfloat-helpers.h" #include "tcg/tcg.h" diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c index dd7af86de73..1480571a1bf 100644 --- a/target/sparc/cpu.c +++ b/target/sparc/cpu.c @@ -23,6 +23,7 @@ #include "qemu/module.h" #include "qemu/qemu-print.h" #include "exec/exec-all.h" +#include "exec/translation-block.h" #include "hw/qdev-properties.h" #include "qapi/visitor.h" #include "tcg/tcg.h" diff --git a/target/tricore/cpu.c b/target/tricore/cpu.c index 1a261715907..95fb546666f 100644 --- a/target/tricore/cpu.c +++ b/target/tricore/cpu.c @@ -21,6 +21,7 @@ #include "qapi/error.h" #include "cpu.h" #include "exec/exec-all.h" +#include "exec/translation-block.h" #include "qemu/error-report.h" #include "tcg/debug-assert.h" From patchwork Thu Dec 12 14:44:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 13905288 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 61A4FE77180 for ; Thu, 12 Dec 2024 14:45:57 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tLkQs-0007q4-3R; Thu, 12 Dec 2024 09:44:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tLkQq-0007pP-H5 for qemu-devel@nongnu.org; Thu, 12 Dec 2024 09:44:48 -0500 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tLkQm-0004EF-C6 for qemu-devel@nongnu.org; Thu, 12 Dec 2024 09:44:47 -0500 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-3862d16b4f5so480912f8f.0 for ; Thu, 12 Dec 2024 06:44:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734014682; x=1734619482; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ubAPSraytKECXi5pOUff7PvfuDwY94ODpHJ+R/dGBjc=; b=cGN65S9CpxNA6phrl/78yxXXpWv+Ay7prx3Dfoa2AjrX9m2dOV2wkk2xdte6wF+3Dl tiFJmRhdHHS7kn1zHvE/dlty7Gs/rwEjXl8fG16cc5Etbuudzd8WcXnr9KAr61nVr3VM q2QBsyo9IPpfCnmh3JptZSepyvc0gs2IC/f3L5Z7FW7+xpRzQWny9i5uJ2vK2DLUae6m sKrSWH92AZKDFOFpBUJzs3hQ3RA/FGQNDiy7/ZYiNtK0D4NZcKHiaecjXuuId0fX0VuC P45vzVCTqGGt0go1tLCdw1Qyv2DZiztzURLTZ2F3aag/mJXx/sAZUpWD57yU1n/cK5Gr Kr3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734014682; x=1734619482; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ubAPSraytKECXi5pOUff7PvfuDwY94ODpHJ+R/dGBjc=; b=gFsVWGDAohtWtoUG/3TeSq8jHIGWRzlTtkF0+Oz5ed85W6vxIVMYKE7OsjlO4FAWKz 8GvgQ+UWqm/mP44J6Lvt7XKJTNe2L6GZeHxdOjILFCMWo4CJwG4pp7aRn7j3e7MidLe3 C0ndg1tJV2276xR9b3YFNX6aGzBVuTR0g2gXJGtxbxI/KTnYXZPF3PrjqJyhLkDxXje4 UFAn0B5aBTfGIz9QkDoKiJP39SOSV1rS8ey2j/yLU+IJ55fx3BMLqsZf/hRimNxYLhgn weBC9knLhMwDmew2jsDGzUA6C5aBRx+Q0ooaw3SN50tvDB0Sz8o4bJowJQXncqs/Sr4g gpXA== X-Gm-Message-State: AOJu0YydNcNYAFMEDy7fy0NJTGJKInYg2M/A2h9GhSpJ+d3LERfRz8xG +g/WItOhPL6OJkPj2XqOQrvnDNaD+BU+fQq7Cb0nqnQGzM7azSEfi8uxW05Tc6dDJqZEBWTYxph m X-Gm-Gg: ASbGncv6VZUtdegjF/jny+vaCuD7eB7ebPGoP7nJ5v8WttXbFTZZpsMju9JCUuc0fwk wYpAMLL8QTOfbD3x8gZrs8zSColwJviyvXWnVJgBuJ2P/upFxFYekM+lDEqwI45X1alfjp+JZQl Yi/C177j9bI3H/Z6Q5yL3QwmS3DtLTT2iRKBestEU9Yw1GC5XLboYQ9jZwLuhP8G10qZs2C8KHu GgAZ30wsK4S36Uvtq9R36SUF0If6RuIsrLXPKlVHDjpMF5BiOXEcSEb+2+kn/GgCMpKFp4eRaax eTCvT396u7NyQM7tu9K91es8zy66Kjw= X-Google-Smtp-Source: AGHT+IGApRXn6HThZjNp+4qmGWF8IVKLRIkEtNIi9QCG/MG/0ewAJxzmzK8bpPMjifZ7llg115+fOA== X-Received: by 2002:a5d:6d81:0:b0:386:3672:73e7 with SMTP id ffacd0b85a97d-387887df018mr2952815f8f.9.1734014682257; Thu, 12 Dec 2024 06:44:42 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-387824a5005sm4212024f8f.41.2024.12.12.06.44.41 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 12 Dec 2024 06:44:41 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= , Pierrick Bouvier Subject: [PATCH v2 2/2] accel/tcg: Include missing 'exec/translation-block.h' header Date: Thu, 12 Dec 2024 15:44:30 +0100 Message-ID: <20241212144430.66224-3-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241212144430.66224-1-philmd@linaro.org> References: <20241212144430.66224-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=philmd@linaro.org; helo=mail-wr1-x42d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org TB compile flags, tb_page_addr_t type, tb_cflags() and few other methods are defined in "exec/translation-block.h". All these files don't include "exec/translation-block.h" but include "exec/exec-all.h" which include it. Explicitly include "exec/translation-block.h" to be able to remove it from "exec/exec-all.h" later when it won't be necessary. Otherwise we'd get errors such: accel/tcg/internal-target.h:59:20: error: a parameter list without types is only allowed in a function definition 59 | void tb_lock_page0(tb_page_addr_t); | ^ accel/tcg/tb-hash.h:64:23: error: unknown type name 'tb_page_addr_t' 64 | uint32_t tb_hash_func(tb_page_addr_t phys_pc, vaddr pc, | ^ accel/tcg/tcg-accel-ops.c:62:36: error: use of undeclared identifier 'CF_CLUSTER_SHIFT' 62 | cflags = cpu->cluster_index << CF_CLUSTER_SHIFT; | ^ accel/tcg/watchpoint.c:102:47: error: use of undeclared identifier 'CF_NOIRQ' 102 | cpu->cflags_next_tb = 1 | CF_NOIRQ | curr_cflags(cpu); | ^ target/i386/helper.c:536:28: error: use of undeclared identifier 'CF_PCREL' 536 | if (tcg_cflags_has(cs, CF_PCREL)) { | ^ target/rx/cpu.c:51:21: error: incomplete definition of type 'struct TranslationBlock' 51 | cpu->env.pc = tb->pc; | ~~^ system/physmem.c:2977:9: error: call to undeclared function 'tb_invalidate_phys_range'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 2977 | tb_invalidate_phys_range(addr, addr + length - 1); | ^ plugins/api.c:96:12: error: call to undeclared function 'tb_cflags'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 96 | return tb_cflags(tcg_ctx->gen_tb) & CF_MEMI_ONLY; | ^ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson Message-Id: <20241114011310.3615-5-philmd@linaro.org> --- accel/tcg/internal-target.h | 1 + accel/tcg/tb-hash.h | 1 + target/arm/tcg/translate.h | 1 + cpu-target.c | 1 + linux-user/elfload.c | 1 + plugins/api.c | 1 + system/physmem.c | 1 + target/alpha/cpu.c | 1 + target/alpha/translate.c | 1 + target/arm/helper.c | 1 + target/avr/translate.c | 1 + target/hppa/translate.c | 1 + target/i386/tcg/tcg-cpu.c | 1 + target/i386/tcg/translate.c | 1 + target/m68k/translate.c | 1 + target/microblaze/translate.c | 1 + target/openrisc/translate.c | 1 + target/ppc/translate.c | 1 + target/riscv/translate.c | 1 + target/rx/translate.c | 1 + target/s390x/tcg/translate.c | 1 + target/sh4/translate.c | 1 + target/sparc/translate.c | 1 + target/tricore/translate.c | 1 + target/xtensa/translate.c | 1 + 25 files changed, 25 insertions(+) diff --git a/accel/tcg/internal-target.h b/accel/tcg/internal-target.h index fe109724c68..efac18e3c9a 100644 --- a/accel/tcg/internal-target.h +++ b/accel/tcg/internal-target.h @@ -11,6 +11,7 @@ #include "exec/exec-all.h" #include "exec/translate-all.h" +#include "exec/translation-block.h" /* * Access to the various translations structures need to be serialised diff --git a/accel/tcg/tb-hash.h b/accel/tcg/tb-hash.h index a0c61f25cda..a5382f460dc 100644 --- a/accel/tcg/tb-hash.h +++ b/accel/tcg/tb-hash.h @@ -22,6 +22,7 @@ #include "exec/cpu-defs.h" #include "exec/exec-all.h" +#include "exec/translation-block.h" #include "qemu/xxhash.h" #include "tb-jmp-cache.h" diff --git a/target/arm/tcg/translate.h b/target/arm/tcg/translate.h index 20cd0e851c4..a533aad7c47 100644 --- a/target/arm/tcg/translate.h +++ b/target/arm/tcg/translate.h @@ -6,6 +6,7 @@ #include "tcg/tcg-op-gvec.h" #include "exec/exec-all.h" #include "exec/translator.h" +#include "exec/translation-block.h" #include "exec/helper-gen.h" #include "internals.h" #include "cpu-features.h" diff --git a/cpu-target.c b/cpu-target.c index 5a7c3290814..d04c8486b0e 100644 --- a/cpu-target.c +++ b/cpu-target.c @@ -42,6 +42,7 @@ #include "exec/exec-all.h" #include "exec/tb-flush.h" #include "exec/translate-all.h" +#include "exec/translation-block.h" #include "exec/log.h" #include "hw/core/accel-cpu.h" #include "trace/trace-root.h" diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 471a384b222..e6f80dcd11e 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -9,6 +9,7 @@ #include "qemu.h" #include "user/tswap-target.h" #include "exec/page-protection.h" +#include "exec/translation-block.h" #include "user/guest-base.h" #include "user-internals.h" #include "signal-common.h" diff --git a/plugins/api.c b/plugins/api.c index 24ea64e2de5..4110cfaa237 100644 --- a/plugins/api.c +++ b/plugins/api.c @@ -43,6 +43,7 @@ #include "tcg/tcg.h" #include "exec/exec-all.h" #include "exec/gdbstub.h" +#include "exec/translation-block.h" #include "exec/translator.h" #include "disas/disas.h" #include "plugin.h" diff --git a/system/physmem.c b/system/physmem.c index 93c0ff60eb4..ac95b06ebfd 100644 --- a/system/physmem.c +++ b/system/physmem.c @@ -34,6 +34,7 @@ #include "exec/exec-all.h" #include "exec/page-protection.h" #include "exec/target_page.h" +#include "exec/translation-block.h" #include "hw/qdev-core.h" #include "hw/qdev-properties.h" #include "hw/boards.h" diff --git a/target/alpha/cpu.c b/target/alpha/cpu.c index 5d75c941f7a..396739e3468 100644 --- a/target/alpha/cpu.c +++ b/target/alpha/cpu.c @@ -24,6 +24,7 @@ #include "qemu/qemu-print.h" #include "cpu.h" #include "exec/exec-all.h" +#include "exec/translation-block.h" #include "fpu/softfloat.h" diff --git a/target/alpha/translate.c b/target/alpha/translate.c index 660788d5c3c..629ff3cde92 100644 --- a/target/alpha/translate.c +++ b/target/alpha/translate.c @@ -26,6 +26,7 @@ #include "exec/helper-proto.h" #include "exec/helper-gen.h" #include "exec/translator.h" +#include "exec/translation-block.h" #include "exec/log.h" #define HELPER_H "helper.h" diff --git a/target/arm/helper.c b/target/arm/helper.c index 63fe4ba318b..0e976a02d3e 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -19,6 +19,7 @@ #include "qemu/crc32c.h" #include "qemu/qemu-print.h" #include "exec/exec-all.h" +#include "exec/translation-block.h" #include /* for crc32 */ #include "hw/irq.h" #include "system/cpu-timers.h" diff --git a/target/avr/translate.c b/target/avr/translate.c index 2d518921159..f13b997f8d9 100644 --- a/target/avr/translate.c +++ b/target/avr/translate.c @@ -23,6 +23,7 @@ #include "tcg/tcg.h" #include "cpu.h" #include "exec/exec-all.h" +#include "exec/translation-block.h" #include "tcg/tcg-op.h" #include "exec/helper-proto.h" #include "exec/helper-gen.h" diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 51c1762435a..d13f80fe3e4 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -27,6 +27,7 @@ #include "exec/helper-proto.h" #include "exec/helper-gen.h" #include "exec/translator.h" +#include "exec/translation-block.h" #include "exec/log.h" #define HELPER_H "helper.h" diff --git a/target/i386/tcg/tcg-cpu.c b/target/i386/tcg/tcg-cpu.c index cca19cd40e8..231ecac37d1 100644 --- a/target/i386/tcg/tcg-cpu.c +++ b/target/i386/tcg/tcg-cpu.c @@ -22,6 +22,7 @@ #include "helper-tcg.h" #include "qemu/accel.h" #include "hw/core/accel-cpu.h" +#include "exec/translation-block.h" #include "tcg-cpu.h" diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index 5d729e68c98..b5439a558e4 100644 --- a/target/i386/tcg/translate.c +++ b/target/i386/tcg/translate.c @@ -21,6 +21,7 @@ #include "qemu/host-utils.h" #include "cpu.h" #include "exec/exec-all.h" +#include "exec/translation-block.h" #include "tcg/tcg-op.h" #include "tcg/tcg-op-gvec.h" #include "exec/translator.h" diff --git a/target/m68k/translate.c b/target/m68k/translate.c index ad3ce345014..077151c62d9 100644 --- a/target/m68k/translate.c +++ b/target/m68k/translate.c @@ -21,6 +21,7 @@ #include "qemu/osdep.h" #include "cpu.h" #include "exec/exec-all.h" +#include "exec/translation-block.h" #include "tcg/tcg-op.h" #include "qemu/log.h" #include "qemu/qemu-print.h" diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index 4beaf69e76a..d53995c26d1 100644 --- a/target/microblaze/translate.c +++ b/target/microblaze/translate.c @@ -26,6 +26,7 @@ #include "exec/helper-proto.h" #include "exec/helper-gen.h" #include "exec/translator.h" +#include "exec/translation-block.h" #include "qemu/qemu-print.h" #include "exec/log.h" diff --git a/target/openrisc/translate.c b/target/openrisc/translate.c index ca566847cb4..028ba66631f 100644 --- a/target/openrisc/translate.c +++ b/target/openrisc/translate.c @@ -26,6 +26,7 @@ #include "qemu/bitops.h" #include "qemu/qemu-print.h" #include "exec/translator.h" +#include "exec/translation-block.h" #include "exec/helper-proto.h" #include "exec/helper-gen.h" diff --git a/target/ppc/translate.c b/target/ppc/translate.c index 47ca50a064b..8ab87f42d67 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -30,6 +30,7 @@ #include "exec/helper-gen.h" #include "exec/translator.h" +#include "exec/translation-block.h" #include "exec/log.h" #include "qemu/atomic128.h" #include "spr_common.h" diff --git a/target/riscv/translate.c b/target/riscv/translate.c index bccaf8e89a6..5fedde363f7 100644 --- a/target/riscv/translate.c +++ b/target/riscv/translate.c @@ -25,6 +25,7 @@ #include "exec/helper-gen.h" #include "exec/translator.h" +#include "exec/translation-block.h" #include "exec/log.h" #include "semihosting/semihost.h" diff --git a/target/rx/translate.c b/target/rx/translate.c index 9aade2b6e5c..4f43654bad0 100644 --- a/target/rx/translate.c +++ b/target/rx/translate.c @@ -25,6 +25,7 @@ #include "exec/helper-proto.h" #include "exec/helper-gen.h" #include "exec/translator.h" +#include "exec/translation-block.h" #include "exec/log.h" #define HELPER_H "helper.h" diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c index bcfff40b255..e78815c4f7f 100644 --- a/target/s390x/tcg/translate.c +++ b/target/s390x/tcg/translate.c @@ -40,6 +40,7 @@ #include "exec/helper-gen.h" #include "exec/translator.h" +#include "exec/translation-block.h" #include "exec/log.h" #include "qemu/atomic128.h" diff --git a/target/sh4/translate.c b/target/sh4/translate.c index 53b092175dc..f076da9bac8 100644 --- a/target/sh4/translate.c +++ b/target/sh4/translate.c @@ -23,6 +23,7 @@ #include "tcg/tcg-op.h" #include "exec/helper-proto.h" #include "exec/helper-gen.h" +#include "exec/translation-block.h" #include "exec/translator.h" #include "exec/log.h" #include "qemu/qemu-print.h" diff --git a/target/sparc/translate.c b/target/sparc/translate.c index cdd0a95c03d..aeb0f826346 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -27,6 +27,7 @@ #include "tcg/tcg-op-gvec.h" #include "exec/helper-gen.h" #include "exec/translator.h" +#include "exec/translation-block.h" #include "exec/log.h" #include "fpu/softfloat.h" #include "asi.h" diff --git a/target/tricore/translate.c b/target/tricore/translate.c index 4a12d2ca191..2b67395c09e 100644 --- a/target/tricore/translate.c +++ b/target/tricore/translate.c @@ -30,6 +30,7 @@ #include "tricore-opcodes.h" #include "exec/translator.h" +#include "exec/translation-block.h" #include "exec/log.h" #define HELPER_H "helper.h" diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c index f4da4a40f94..3c62c99b4fe 100644 --- a/target/xtensa/translate.c +++ b/target/xtensa/translate.c @@ -37,6 +37,7 @@ #include "qemu/qemu-print.h" #include "semihosting/semihost.h" #include "exec/translator.h" +#include "exec/translation-block.h" #include "exec/helper-proto.h" #include "exec/helper-gen.h"