* [PATCH 1/8] target/ppc/pmu: Include missing 'qemu/timer.h' header
2023-08-28 14:55 [PATCH 0/8] target/translate: Remove unused "exec/cpu_ldst.h" / "qemu/main-loop.h" Philippe Mathieu-Daudé
@ 2023-08-28 14:55 ` Philippe Mathieu-Daudé
2023-08-28 14:55 ` [PATCH 2/8] target/riscv/pmu: Restrict 'qemu/log.h' include to source Philippe Mathieu-Daudé
` (6 subsequent siblings)
7 siblings, 0 replies; 17+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-08-28 14:55 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-arm, qemu-s390x, qemu-ppc, qemu-riscv,
Philippe Mathieu-Daudé
Since commit c2eff582a3 ("target/ppc: PMU basic cycle count for
pseries TCG") pmu_update_cycles() uses QEMU_CLOCK_VIRTUAL and
calls qemu_clock_get_ns(), both defined in "qemu/timer.h".
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/ppc/power8-pmu.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/target/ppc/power8-pmu.c b/target/ppc/power8-pmu.c
index 7bb4bf81f7..2537cded83 100644
--- a/target/ppc/power8-pmu.c
+++ b/target/ppc/power8-pmu.c
@@ -16,6 +16,7 @@
#include "exec/exec-all.h"
#include "exec/helper-proto.h"
#include "qemu/error-report.h"
+#include "qemu/timer.h"
#include "qemu/main-loop.h"
#include "hw/ppc/ppc.h"
#include "power8-pmu.h"
--
2.41.0
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 2/8] target/riscv/pmu: Restrict 'qemu/log.h' include to source
2023-08-28 14:55 [PATCH 0/8] target/translate: Remove unused "exec/cpu_ldst.h" / "qemu/main-loop.h" Philippe Mathieu-Daudé
2023-08-28 14:55 ` [PATCH 1/8] target/ppc/pmu: Include missing 'qemu/timer.h' header Philippe Mathieu-Daudé
@ 2023-08-28 14:55 ` Philippe Mathieu-Daudé
2023-08-28 14:55 ` [PATCH 3/8] target/translate: Include missing 'exec/cpu_ldst.h' header Philippe Mathieu-Daudé
` (5 subsequent siblings)
7 siblings, 0 replies; 17+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-08-28 14:55 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-arm, qemu-s390x, qemu-ppc, qemu-riscv,
Philippe Mathieu-Daudé
Declarations from "riscv/pmu.h" don't need anything from "qemu/log.h",
reduce it's inclusion to the source.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/riscv/pmu.h | 1 -
target/riscv/pmu.c | 1 +
2 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/riscv/pmu.h b/target/riscv/pmu.h
index 0c819ca983..d2be06a133 100644
--- a/target/riscv/pmu.h
+++ b/target/riscv/pmu.h
@@ -16,7 +16,6 @@
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "qemu/log.h"
#include "cpu.h"
#include "qemu/main-loop.h"
#include "exec/exec-all.h"
diff --git a/target/riscv/pmu.c b/target/riscv/pmu.c
index db06b3882f..36f6307d28 100644
--- a/target/riscv/pmu.c
+++ b/target/riscv/pmu.c
@@ -17,6 +17,7 @@
*/
#include "qemu/osdep.h"
+#include "qemu/log.h"
#include "cpu.h"
#include "pmu.h"
#include "sysemu/cpu-timers.h"
--
2.41.0
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 3/8] target/translate: Include missing 'exec/cpu_ldst.h' header
2023-08-28 14:55 [PATCH 0/8] target/translate: Remove unused "exec/cpu_ldst.h" / "qemu/main-loop.h" Philippe Mathieu-Daudé
2023-08-28 14:55 ` [PATCH 1/8] target/ppc/pmu: Include missing 'qemu/timer.h' header Philippe Mathieu-Daudé
2023-08-28 14:55 ` [PATCH 2/8] target/riscv/pmu: Restrict 'qemu/log.h' include to source Philippe Mathieu-Daudé
@ 2023-08-28 14:55 ` Philippe Mathieu-Daudé
2023-08-28 18:35 ` Richard Henderson
2023-08-28 14:55 ` [PATCH 4/8] target/translate: Remove unnecessary " Philippe Mathieu-Daudé
` (4 subsequent siblings)
7 siblings, 1 reply; 17+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-08-28 14:55 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-arm, qemu-s390x, qemu-ppc, qemu-riscv,
Philippe Mathieu-Daudé
All these files access the CPU LD/ST API declared in "exec/cpu_ldst.h".
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/avr/helper.c | 1 +
target/i386/tcg/fpu_helper.c | 1 +
target/i386/tcg/sysemu/excp_helper.c | 1 +
target/loongarch/cpu.c | 1 +
target/mips/tcg/ldst_helper.c | 1 +
target/mips/tcg/msa_helper.c | 1 +
target/riscv/op_helper.c | 1 +
target/riscv/vector_helper.c | 1 +
8 files changed, 8 insertions(+)
diff --git a/target/avr/helper.c b/target/avr/helper.c
index e6e7d51487..fdc9884ea0 100644
--- a/target/avr/helper.c
+++ b/target/avr/helper.c
@@ -24,6 +24,7 @@
#include "cpu.h"
#include "hw/core/tcg-cpu-ops.h"
#include "exec/exec-all.h"
+#include "exec/cpu_ldst.h"
#include "exec/address-spaces.h"
#include "exec/helper-proto.h"
diff --git a/target/i386/tcg/fpu_helper.c b/target/i386/tcg/fpu_helper.c
index 6f3741b635..4430d3d380 100644
--- a/target/i386/tcg/fpu_helper.c
+++ b/target/i386/tcg/fpu_helper.c
@@ -21,6 +21,7 @@
#include <math.h>
#include "cpu.h"
#include "tcg-cpu.h"
+#include "exec/cpu_ldst.h"
#include "exec/helper-proto.h"
#include "fpu/softfloat.h"
#include "fpu/softfloat-macros.h"
diff --git a/target/i386/tcg/sysemu/excp_helper.c b/target/i386/tcg/sysemu/excp_helper.c
index b5f0abffa3..226689a4f2 100644
--- a/target/i386/tcg/sysemu/excp_helper.c
+++ b/target/i386/tcg/sysemu/excp_helper.c
@@ -19,6 +19,7 @@
#include "qemu/osdep.h"
#include "cpu.h"
+#include "exec/cpu_ldst.h"
#include "exec/exec-all.h"
#include "tcg/helper-tcg.h"
diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c
index 27fc6e1f33..65f9320e34 100644
--- a/target/loongarch/cpu.c
+++ b/target/loongarch/cpu.c
@@ -11,6 +11,7 @@
#include "qapi/error.h"
#include "qemu/module.h"
#include "sysemu/qtest.h"
+#include "exec/cpu_ldst.h"
#include "exec/exec-all.h"
#include "cpu.h"
#include "internals.h"
diff --git a/target/mips/tcg/ldst_helper.c b/target/mips/tcg/ldst_helper.c
index c1a8380e34..97056d00a2 100644
--- a/target/mips/tcg/ldst_helper.c
+++ b/target/mips/tcg/ldst_helper.c
@@ -24,6 +24,7 @@
#include "cpu.h"
#include "exec/helper-proto.h"
#include "exec/exec-all.h"
+#include "exec/cpu_ldst.h"
#include "exec/memop.h"
#include "internal.h"
diff --git a/target/mips/tcg/msa_helper.c b/target/mips/tcg/msa_helper.c
index 29b31d70fe..c8597b9e30 100644
--- a/target/mips/tcg/msa_helper.c
+++ b/target/mips/tcg/msa_helper.c
@@ -22,6 +22,7 @@
#include "internal.h"
#include "tcg/tcg.h"
#include "exec/exec-all.h"
+#include "exec/cpu_ldst.h"
#include "exec/helper-proto.h"
#include "exec/memop.h"
#include "fpu/softfloat.h"
diff --git a/target/riscv/op_helper.c b/target/riscv/op_helper.c
index 9cdb9cdd06..7e2f1908ee 100644
--- a/target/riscv/op_helper.c
+++ b/target/riscv/op_helper.c
@@ -23,6 +23,7 @@
#include "internals.h"
#include "qemu/main-loop.h"
#include "exec/exec-all.h"
+#include "exec/cpu_ldst.h"
#include "exec/helper-proto.h"
/* Exceptions processing helpers */
diff --git a/target/riscv/vector_helper.c b/target/riscv/vector_helper.c
index 4d06754826..e3ef2113d6 100644
--- a/target/riscv/vector_helper.c
+++ b/target/riscv/vector_helper.c
@@ -22,6 +22,7 @@
#include "cpu.h"
#include "exec/memop.h"
#include "exec/exec-all.h"
+#include "exec/cpu_ldst.h"
#include "exec/helper-proto.h"
#include "fpu/softfloat.h"
#include "tcg/tcg-gvec-desc.h"
--
2.41.0
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH 3/8] target/translate: Include missing 'exec/cpu_ldst.h' header
2023-08-28 14:55 ` [PATCH 3/8] target/translate: Include missing 'exec/cpu_ldst.h' header Philippe Mathieu-Daudé
@ 2023-08-28 18:35 ` Richard Henderson
0 siblings, 0 replies; 17+ messages in thread
From: Richard Henderson @ 2023-08-28 18:35 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: qemu-arm, qemu-s390x, qemu-ppc, qemu-riscv
On 8/28/23 07:55, Philippe Mathieu-Daudé wrote:
> All these files access the CPU LD/ST API declared in "exec/cpu_ldst.h".
>
> Signed-off-by: Philippe Mathieu-Daudé<philmd@linaro.org>
> ---
> target/avr/helper.c | 1 +
> target/i386/tcg/fpu_helper.c | 1 +
> target/i386/tcg/sysemu/excp_helper.c | 1 +
> target/loongarch/cpu.c | 1 +
> target/mips/tcg/ldst_helper.c | 1 +
> target/mips/tcg/msa_helper.c | 1 +
> target/riscv/op_helper.c | 1 +
> target/riscv/vector_helper.c | 1 +
> 8 files changed, 8 insertions(+)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 4/8] target/translate: Remove unnecessary 'exec/cpu_ldst.h' header
2023-08-28 14:55 [PATCH 0/8] target/translate: Remove unused "exec/cpu_ldst.h" / "qemu/main-loop.h" Philippe Mathieu-Daudé
` (2 preceding siblings ...)
2023-08-28 14:55 ` [PATCH 3/8] target/translate: Include missing 'exec/cpu_ldst.h' header Philippe Mathieu-Daudé
@ 2023-08-28 14:55 ` Philippe Mathieu-Daudé
2023-08-28 18:35 ` Richard Henderson
2023-08-28 14:55 ` [PATCH 5/8] target/translate: Restrict 'exec/cpu_ldst.h' to user emulation Philippe Mathieu-Daudé
` (3 subsequent siblings)
7 siblings, 1 reply; 17+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-08-28 14:55 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-arm, qemu-s390x, qemu-ppc, qemu-riscv,
Philippe Mathieu-Daudé
All these files only access the translator_ld/st API declared
in "exec/translator.h". The CPU ld/st API from declared in
"exec/cpu_ldst.h" is not used, remove it.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/alpha/translate.c | 1 -
target/hexagon/translate.c | 1 -
target/hppa/translate.c | 1 -
target/m68k/translate.c | 1 -
target/microblaze/translate.c | 1 -
target/nios2/translate.c | 1 -
target/openrisc/translate.c | 1 -
target/ppc/translate.c | 1 -
target/sh4/translate.c | 1 -
target/sparc/translate.c | 1 -
10 files changed, 10 deletions(-)
diff --git a/target/alpha/translate.c b/target/alpha/translate.c
index 846f3d8091..d73ed28da0 100644
--- a/target/alpha/translate.c
+++ b/target/alpha/translate.c
@@ -24,7 +24,6 @@
#include "qemu/host-utils.h"
#include "exec/exec-all.h"
#include "tcg/tcg-op.h"
-#include "exec/cpu_ldst.h"
#include "exec/helper-proto.h"
#include "exec/helper-gen.h"
#include "exec/translator.h"
diff --git a/target/hexagon/translate.c b/target/hexagon/translate.c
index 708339198e..c00254e4d5 100644
--- a/target/hexagon/translate.c
+++ b/target/hexagon/translate.c
@@ -23,7 +23,6 @@
#include "exec/helper-gen.h"
#include "exec/helper-proto.h"
#include "exec/translation-block.h"
-#include "exec/cpu_ldst.h"
#include "exec/log.h"
#include "internal.h"
#include "attribs.h"
diff --git a/target/hppa/translate.c b/target/hppa/translate.c
index d66fcb3e6a..e57ac57338 100644
--- a/target/hppa/translate.c
+++ b/target/hppa/translate.c
@@ -23,7 +23,6 @@
#include "qemu/host-utils.h"
#include "exec/exec-all.h"
#include "tcg/tcg-op.h"
-#include "exec/cpu_ldst.h"
#include "exec/helper-proto.h"
#include "exec/helper-gen.h"
#include "exec/translator.h"
diff --git a/target/m68k/translate.c b/target/m68k/translate.c
index e07161d76f..5e68159634 100644
--- a/target/m68k/translate.c
+++ b/target/m68k/translate.c
@@ -25,7 +25,6 @@
#include "tcg/tcg-op.h"
#include "qemu/log.h"
#include "qemu/qemu-print.h"
-#include "exec/cpu_ldst.h"
#include "exec/translator.h"
#include "exec/helper-proto.h"
diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c
index 7e7f837c63..d02c16296a 100644
--- a/target/microblaze/translate.c
+++ b/target/microblaze/translate.c
@@ -24,7 +24,6 @@
#include "exec/exec-all.h"
#include "tcg/tcg-op.h"
#include "exec/helper-proto.h"
-#include "exec/cpu_ldst.h"
#include "exec/helper-gen.h"
#include "exec/translator.h"
#include "qemu/qemu-print.h"
diff --git a/target/nios2/translate.c b/target/nios2/translate.c
index 4264c7ec6b..dfc546d3bb 100644
--- a/target/nios2/translate.c
+++ b/target/nios2/translate.c
@@ -29,7 +29,6 @@
#include "exec/helper-proto.h"
#include "exec/helper-gen.h"
#include "exec/log.h"
-#include "exec/cpu_ldst.h"
#include "exec/translator.h"
#include "qemu/qemu-print.h"
#include "semihosting/semihost.h"
diff --git a/target/openrisc/translate.c b/target/openrisc/translate.c
index a86360d4f5..30ff63ac0b 100644
--- a/target/openrisc/translate.c
+++ b/target/openrisc/translate.c
@@ -26,7 +26,6 @@
#include "qemu/log.h"
#include "qemu/bitops.h"
#include "qemu/qemu-print.h"
-#include "exec/cpu_ldst.h"
#include "exec/translator.h"
#include "exec/helper-proto.h"
diff --git a/target/ppc/translate.c b/target/ppc/translate.c
index 74796ec7ba..49b6a757b7 100644
--- a/target/ppc/translate.c
+++ b/target/ppc/translate.c
@@ -27,7 +27,6 @@
#include "tcg/tcg-op-gvec.h"
#include "qemu/host-utils.h"
#include "qemu/main-loop.h"
-#include "exec/cpu_ldst.h"
#include "exec/helper-proto.h"
#include "exec/helper-gen.h"
diff --git a/target/sh4/translate.c b/target/sh4/translate.c
index 49c87d7a01..c1e590feb3 100644
--- a/target/sh4/translate.c
+++ b/target/sh4/translate.c
@@ -22,7 +22,6 @@
#include "disas/disas.h"
#include "exec/exec-all.h"
#include "tcg/tcg-op.h"
-#include "exec/cpu_ldst.h"
#include "exec/helper-proto.h"
#include "exec/helper-gen.h"
#include "exec/translator.h"
diff --git a/target/sparc/translate.c b/target/sparc/translate.c
index bd877a5e4a..3e108fb19a 100644
--- a/target/sparc/translate.c
+++ b/target/sparc/translate.c
@@ -25,7 +25,6 @@
#include "exec/helper-proto.h"
#include "exec/exec-all.h"
#include "tcg/tcg-op.h"
-#include "exec/cpu_ldst.h"
#include "exec/helper-gen.h"
--
2.41.0
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH 4/8] target/translate: Remove unnecessary 'exec/cpu_ldst.h' header
2023-08-28 14:55 ` [PATCH 4/8] target/translate: Remove unnecessary " Philippe Mathieu-Daudé
@ 2023-08-28 18:35 ` Richard Henderson
0 siblings, 0 replies; 17+ messages in thread
From: Richard Henderson @ 2023-08-28 18:35 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: qemu-arm, qemu-s390x, qemu-ppc, qemu-riscv
On 8/28/23 07:55, Philippe Mathieu-Daudé wrote:
> All these files only access the translator_ld/st API declared
> in "exec/translator.h". The CPU ld/st API from declared in
> "exec/cpu_ldst.h" is not used, remove it.
>
> Signed-off-by: Philippe Mathieu-Daudé<philmd@linaro.org>
> ---
> target/alpha/translate.c | 1 -
> target/hexagon/translate.c | 1 -
> target/hppa/translate.c | 1 -
> target/m68k/translate.c | 1 -
> target/microblaze/translate.c | 1 -
> target/nios2/translate.c | 1 -
> target/openrisc/translate.c | 1 -
> target/ppc/translate.c | 1 -
> target/sh4/translate.c | 1 -
> target/sparc/translate.c | 1 -
> 10 files changed, 10 deletions(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 5/8] target/translate: Restrict 'exec/cpu_ldst.h' to user emulation
2023-08-28 14:55 [PATCH 0/8] target/translate: Remove unused "exec/cpu_ldst.h" / "qemu/main-loop.h" Philippe Mathieu-Daudé
` (3 preceding siblings ...)
2023-08-28 14:55 ` [PATCH 4/8] target/translate: Remove unnecessary " Philippe Mathieu-Daudé
@ 2023-08-28 14:55 ` Philippe Mathieu-Daudé
2023-08-28 18:37 ` Richard Henderson
2023-08-28 14:55 ` [PATCH 6/8] target/helpers: Remove unnecessary 'exec/cpu_ldst.h' header Philippe Mathieu-Daudé
` (2 subsequent siblings)
7 siblings, 1 reply; 17+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-08-28 14:55 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-arm, qemu-s390x, qemu-ppc, qemu-riscv,
Philippe Mathieu-Daudé
Only handle_sigsegv_accerr_write(), declared with user
emulation, requires "exec/cpu_ldst.h" (for the abi_ptr
typedef).
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/exec/exec-all.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h
index d02517e95f..b2f5cd4c2a 100644
--- a/include/exec/exec-all.h
+++ b/include/exec/exec-all.h
@@ -21,7 +21,7 @@
#define EXEC_ALL_H
#include "cpu.h"
-#ifdef CONFIG_TCG
+#if defined(CONFIG_USER_ONLY)
#include "exec/cpu_ldst.h"
#endif
#include "exec/translation-block.h"
--
2.41.0
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH 5/8] target/translate: Restrict 'exec/cpu_ldst.h' to user emulation
2023-08-28 14:55 ` [PATCH 5/8] target/translate: Restrict 'exec/cpu_ldst.h' to user emulation Philippe Mathieu-Daudé
@ 2023-08-28 18:37 ` Richard Henderson
0 siblings, 0 replies; 17+ messages in thread
From: Richard Henderson @ 2023-08-28 18:37 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: qemu-arm, qemu-s390x, qemu-ppc, qemu-riscv
On 8/28/23 07:55, Philippe Mathieu-Daudé wrote:
> Only handle_sigsegv_accerr_write(), declared with user
> emulation, requires "exec/cpu_ldst.h" (for the abi_ptr
> typedef).
>
> Signed-off-by: Philippe Mathieu-Daudé<philmd@linaro.org>
> ---
> include/exec/exec-all.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 6/8] target/helpers: Remove unnecessary 'exec/cpu_ldst.h' header
2023-08-28 14:55 [PATCH 0/8] target/translate: Remove unused "exec/cpu_ldst.h" / "qemu/main-loop.h" Philippe Mathieu-Daudé
` (4 preceding siblings ...)
2023-08-28 14:55 ` [PATCH 5/8] target/translate: Restrict 'exec/cpu_ldst.h' to user emulation Philippe Mathieu-Daudé
@ 2023-08-28 14:55 ` Philippe Mathieu-Daudé
2023-08-28 18:37 ` Richard Henderson
2023-08-28 14:55 ` [PATCH 7/8] target/helper: Remove unnecessary 'qemu/main-loop.h' header Philippe Mathieu-Daudé
2023-08-28 14:55 ` [PATCH 8/8] target/mips: Remove unused headers in lcsr_helper.c Philippe Mathieu-Daudé
7 siblings, 1 reply; 17+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-08-28 14:55 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-arm, qemu-s390x, qemu-ppc, qemu-riscv,
Philippe Mathieu-Daudé
These files don't use the CPU ld/st API, remove the unnecessary
"exec/cpu_ldst.h" header.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/cris/op_helper.c | 1 -
target/mips/tcg/fpu_helper.c | 1 -
target/mips/tcg/sysemu/lcsr_helper.c | 1 -
target/s390x/tcg/excp_helper.c | 1 -
target/s390x/tcg/fpu_helper.c | 1 -
5 files changed, 5 deletions(-)
diff --git a/target/cris/op_helper.c b/target/cris/op_helper.c
index 40cb74ce73..98a9aaf504 100644
--- a/target/cris/op_helper.c
+++ b/target/cris/op_helper.c
@@ -24,7 +24,6 @@
#include "exec/helper-proto.h"
#include "qemu/host-utils.h"
#include "exec/exec-all.h"
-#include "exec/cpu_ldst.h"
//#define CRIS_OP_HELPER_DEBUG
diff --git a/target/mips/tcg/fpu_helper.c b/target/mips/tcg/fpu_helper.c
index 8ce56ed7c8..45d593de48 100644
--- a/target/mips/tcg/fpu_helper.c
+++ b/target/mips/tcg/fpu_helper.c
@@ -25,7 +25,6 @@
#include "internal.h"
#include "exec/helper-proto.h"
#include "exec/exec-all.h"
-#include "exec/cpu_ldst.h"
#include "fpu/softfloat.h"
#include "fpu_helper.h"
diff --git a/target/mips/tcg/sysemu/lcsr_helper.c b/target/mips/tcg/sysemu/lcsr_helper.c
index 942143d209..8f97d04313 100644
--- a/target/mips/tcg/sysemu/lcsr_helper.c
+++ b/target/mips/tcg/sysemu/lcsr_helper.c
@@ -13,7 +13,6 @@
#include "qemu/host-utils.h"
#include "exec/helper-proto.h"
#include "exec/exec-all.h"
-#include "exec/cpu_ldst.h"
#define GET_MEMTXATTRS(cas) \
((MemTxAttrs){.requester_id = env_cpu(cas)->cpu_index})
diff --git a/target/s390x/tcg/excp_helper.c b/target/s390x/tcg/excp_helper.c
index b7116d0577..b875bf14e5 100644
--- a/target/s390x/tcg/excp_helper.c
+++ b/target/s390x/tcg/excp_helper.c
@@ -23,7 +23,6 @@
#include "cpu.h"
#include "exec/helper-proto.h"
#include "exec/exec-all.h"
-#include "exec/cpu_ldst.h"
#include "s390x-internal.h"
#include "tcg_s390x.h"
#ifndef CONFIG_USER_ONLY
diff --git a/target/s390x/tcg/fpu_helper.c b/target/s390x/tcg/fpu_helper.c
index c329b31261..d8bd5748fa 100644
--- a/target/s390x/tcg/fpu_helper.c
+++ b/target/s390x/tcg/fpu_helper.c
@@ -23,7 +23,6 @@
#include "s390x-internal.h"
#include "tcg_s390x.h"
#include "exec/exec-all.h"
-#include "exec/cpu_ldst.h"
#include "exec/helper-proto.h"
#include "fpu/softfloat.h"
--
2.41.0
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 7/8] target/helper: Remove unnecessary 'qemu/main-loop.h' header
2023-08-28 14:55 [PATCH 0/8] target/translate: Remove unused "exec/cpu_ldst.h" / "qemu/main-loop.h" Philippe Mathieu-Daudé
` (5 preceding siblings ...)
2023-08-28 14:55 ` [PATCH 6/8] target/helpers: Remove unnecessary 'exec/cpu_ldst.h' header Philippe Mathieu-Daudé
@ 2023-08-28 14:55 ` Philippe Mathieu-Daudé
2023-08-28 18:40 ` Richard Henderson
2023-08-28 14:55 ` [PATCH 8/8] target/mips: Remove unused headers in lcsr_helper.c Philippe Mathieu-Daudé
7 siblings, 1 reply; 17+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-08-28 14:55 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-arm, qemu-s390x, qemu-ppc, qemu-riscv,
Philippe Mathieu-Daudé
"qemu/main-loop.h" declares functions related to QEMU's
main loop mutex, which these files don't access. Remove
the unused "qemu/main-loop.h" header.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/riscv/pmu.h | 2 --
target/arm/ptw.c | 1 -
target/loongarch/iocsr_helper.c | 1 -
target/loongarch/op_helper.c | 1 -
target/mips/tcg/sysemu/lcsr_helper.c | 1 -
target/nios2/op_helper.c | 1 -
target/ppc/int_helper.c | 1 -
target/ppc/machine.c | 1 -
target/ppc/mem_helper.c | 1 -
target/ppc/mmu_common.c | 1 -
target/ppc/mmu_helper.c | 1 -
target/ppc/power8-pmu.c | 1 -
target/ppc/translate.c | 1 -
target/riscv/csr.c | 1 -
target/riscv/m128_helper.c | 1 -
target/riscv/op_helper.c | 1 -
target/s390x/tcg/crypto_helper.c | 1 -
target/s390x/tcg/misc_helper.c | 1 -
target/xtensa/dbg_helper.c | 1 -
target/xtensa/fpu_helper.c | 1 -
target/xtensa/mmu_helper.c | 2 --
target/xtensa/op_helper.c | 2 --
target/xtensa/win_helper.c | 1 -
23 files changed, 26 deletions(-)
diff --git a/target/riscv/pmu.h b/target/riscv/pmu.h
index d2be06a133..2bfb71ba87 100644
--- a/target/riscv/pmu.h
+++ b/target/riscv/pmu.h
@@ -17,8 +17,6 @@
*/
#include "cpu.h"
-#include "qemu/main-loop.h"
-#include "exec/exec-all.h"
bool riscv_pmu_ctr_monitor_instructions(CPURISCVState *env,
uint32_t target_ctr);
diff --git a/target/arm/ptw.c b/target/arm/ptw.c
index bfbab26b9b..a4b0172df3 100644
--- a/target/arm/ptw.c
+++ b/target/arm/ptw.c
@@ -9,7 +9,6 @@
#include "qemu/osdep.h"
#include "qemu/log.h"
#include "qemu/range.h"
-#include "qemu/main-loop.h"
#include "exec/exec-all.h"
#include "cpu.h"
#include "internals.h"
diff --git a/target/loongarch/iocsr_helper.c b/target/loongarch/iocsr_helper.c
index dda9845d6c..6cd01d5f09 100644
--- a/target/loongarch/iocsr_helper.c
+++ b/target/loongarch/iocsr_helper.c
@@ -6,7 +6,6 @@
*/
#include "qemu/osdep.h"
-#include "qemu/main-loop.h"
#include "cpu.h"
#include "qemu/host-utils.h"
#include "exec/helper-proto.h"
diff --git a/target/loongarch/op_helper.c b/target/loongarch/op_helper.c
index cf84f20aba..fe79c62fa4 100644
--- a/target/loongarch/op_helper.c
+++ b/target/loongarch/op_helper.c
@@ -7,7 +7,6 @@
#include "qemu/osdep.h"
#include "qemu/log.h"
-#include "qemu/main-loop.h"
#include "cpu.h"
#include "qemu/host-utils.h"
#include "exec/helper-proto.h"
diff --git a/target/mips/tcg/sysemu/lcsr_helper.c b/target/mips/tcg/sysemu/lcsr_helper.c
index 8f97d04313..fb57bcbb78 100644
--- a/target/mips/tcg/sysemu/lcsr_helper.c
+++ b/target/mips/tcg/sysemu/lcsr_helper.c
@@ -7,7 +7,6 @@
*/
#include "qemu/osdep.h"
-#include "qemu/main-loop.h"
#include "cpu.h"
#include "internal.h"
#include "qemu/host-utils.h"
diff --git a/target/nios2/op_helper.c b/target/nios2/op_helper.c
index 0aaf33ffc2..5017457c5e 100644
--- a/target/nios2/op_helper.c
+++ b/target/nios2/op_helper.c
@@ -22,7 +22,6 @@
#include "cpu.h"
#include "exec/helper-proto.h"
#include "exec/exec-all.h"
-#include "qemu/main-loop.h"
void helper_raise_exception(CPUNios2State *env, uint32_t index)
{
diff --git a/target/ppc/int_helper.c b/target/ppc/int_helper.c
index 834da80fe3..96cdb3c7e3 100644
--- a/target/ppc/int_helper.c
+++ b/target/ppc/int_helper.c
@@ -21,7 +21,6 @@
#include "cpu.h"
#include "internal.h"
#include "qemu/host-utils.h"
-#include "qemu/main-loop.h"
#include "qemu/log.h"
#include "exec/helper-proto.h"
#include "crypto/aes.h"
diff --git a/target/ppc/machine.c b/target/ppc/machine.c
index 134b16c625..1270a1f7fc 100644
--- a/target/ppc/machine.c
+++ b/target/ppc/machine.c
@@ -7,7 +7,6 @@
#include "mmu-hash64.h"
#include "migration/cpu.h"
#include "qapi/error.h"
-#include "qemu/main-loop.h"
#include "kvm_ppc.h"
#include "power8-pmu.h"
diff --git a/target/ppc/mem_helper.c b/target/ppc/mem_helper.c
index 46eae65819..c7535481d6 100644
--- a/target/ppc/mem_helper.c
+++ b/target/ppc/mem_helper.c
@@ -21,7 +21,6 @@
#include "cpu.h"
#include "exec/exec-all.h"
#include "qemu/host-utils.h"
-#include "qemu/main-loop.h"
#include "exec/helper-proto.h"
#include "helper_regs.h"
#include "exec/cpu_ldst.h"
diff --git a/target/ppc/mmu_common.c b/target/ppc/mmu_common.c
index 8c000e250d..6ca5d12207 100644
--- a/target/ppc/mmu_common.c
+++ b/target/ppc/mmu_common.c
@@ -28,7 +28,6 @@
#include "exec/log.h"
#include "helper_regs.h"
#include "qemu/error-report.h"
-#include "qemu/main-loop.h"
#include "qemu/qemu-print.h"
#include "internal.h"
#include "mmu-book3s-v3.h"
diff --git a/target/ppc/mmu_helper.c b/target/ppc/mmu_helper.c
index d3ea7588f9..f87d35379a 100644
--- a/target/ppc/mmu_helper.c
+++ b/target/ppc/mmu_helper.c
@@ -28,7 +28,6 @@
#include "exec/log.h"
#include "helper_regs.h"
#include "qemu/error-report.h"
-#include "qemu/main-loop.h"
#include "qemu/qemu-print.h"
#include "internal.h"
#include "mmu-book3s-v3.h"
diff --git a/target/ppc/power8-pmu.c b/target/ppc/power8-pmu.c
index 2537cded83..cbc5889d91 100644
--- a/target/ppc/power8-pmu.c
+++ b/target/ppc/power8-pmu.c
@@ -17,7 +17,6 @@
#include "exec/helper-proto.h"
#include "qemu/error-report.h"
#include "qemu/timer.h"
-#include "qemu/main-loop.h"
#include "hw/ppc/ppc.h"
#include "power8-pmu.h"
diff --git a/target/ppc/translate.c b/target/ppc/translate.c
index 49b6a757b7..7111b34030 100644
--- a/target/ppc/translate.c
+++ b/target/ppc/translate.c
@@ -26,7 +26,6 @@
#include "tcg/tcg-op.h"
#include "tcg/tcg-op-gvec.h"
#include "qemu/host-utils.h"
-#include "qemu/main-loop.h"
#include "exec/helper-proto.h"
#include "exec/helper-gen.h"
diff --git a/target/riscv/csr.c b/target/riscv/csr.c
index ea7585329e..de31818daa 100644
--- a/target/riscv/csr.c
+++ b/target/riscv/csr.c
@@ -23,7 +23,6 @@
#include "cpu.h"
#include "pmu.h"
#include "time_helper.h"
-#include "qemu/main-loop.h"
#include "exec/exec-all.h"
#include "exec/tb-flush.h"
#include "sysemu/cpu-timers.h"
diff --git a/target/riscv/m128_helper.c b/target/riscv/m128_helper.c
index e6a4f6120a..ec14aaa901 100644
--- a/target/riscv/m128_helper.c
+++ b/target/riscv/m128_helper.c
@@ -19,7 +19,6 @@
#include "qemu/osdep.h"
#include "cpu.h"
-#include "qemu/main-loop.h"
#include "exec/exec-all.h"
#include "exec/helper-proto.h"
diff --git a/target/riscv/op_helper.c b/target/riscv/op_helper.c
index 7e2f1908ee..5355225d56 100644
--- a/target/riscv/op_helper.c
+++ b/target/riscv/op_helper.c
@@ -21,7 +21,6 @@
#include "qemu/osdep.h"
#include "cpu.h"
#include "internals.h"
-#include "qemu/main-loop.h"
#include "exec/exec-all.h"
#include "exec/cpu_ldst.h"
#include "exec/helper-proto.h"
diff --git a/target/s390x/tcg/crypto_helper.c b/target/s390x/tcg/crypto_helper.c
index 762b277884..93aabd236f 100644
--- a/target/s390x/tcg/crypto_helper.c
+++ b/target/s390x/tcg/crypto_helper.c
@@ -13,7 +13,6 @@
*/
#include "qemu/osdep.h"
-#include "qemu/main-loop.h"
#include "qemu/guest-random.h"
#include "s390x-internal.h"
#include "tcg_s390x.h"
diff --git a/target/s390x/tcg/misc_helper.c b/target/s390x/tcg/misc_helper.c
index 576157b1f3..e85658ce22 100644
--- a/target/s390x/tcg/misc_helper.c
+++ b/target/s390x/tcg/misc_helper.c
@@ -20,7 +20,6 @@
#include "qemu/osdep.h"
#include "qemu/cutils.h"
-#include "qemu/main-loop.h"
#include "cpu.h"
#include "s390x-internal.h"
#include "qemu/host-utils.h"
diff --git a/target/xtensa/dbg_helper.c b/target/xtensa/dbg_helper.c
index ce2a820c60..3e0c9e8e8b 100644
--- a/target/xtensa/dbg_helper.c
+++ b/target/xtensa/dbg_helper.c
@@ -27,7 +27,6 @@
#include "qemu/osdep.h"
#include "qemu/log.h"
-#include "qemu/main-loop.h"
#include "cpu.h"
#include "exec/helper-proto.h"
#include "qemu/host-utils.h"
diff --git a/target/xtensa/fpu_helper.c b/target/xtensa/fpu_helper.c
index d2a10cc797..381e83ded8 100644
--- a/target/xtensa/fpu_helper.c
+++ b/target/xtensa/fpu_helper.c
@@ -27,7 +27,6 @@
#include "qemu/osdep.h"
#include "qemu/log.h"
-#include "qemu/main-loop.h"
#include "cpu.h"
#include "exec/helper-proto.h"
#include "qemu/host-utils.h"
diff --git a/target/xtensa/mmu_helper.c b/target/xtensa/mmu_helper.c
index fa66e8e867..12552a3347 100644
--- a/target/xtensa/mmu_helper.c
+++ b/target/xtensa/mmu_helper.c
@@ -27,14 +27,12 @@
#include "qemu/osdep.h"
#include "qemu/log.h"
-#include "qemu/main-loop.h"
#include "qemu/qemu-print.h"
#include "qemu/units.h"
#include "cpu.h"
#include "exec/helper-proto.h"
#include "qemu/host-utils.h"
#include "exec/exec-all.h"
-#include "exec/cpu_ldst.h"
#define XTENSA_MPU_SEGMENT_MASK 0x0000001f
#define XTENSA_MPU_ACC_RIGHTS_MASK 0x00000f00
diff --git a/target/xtensa/op_helper.c b/target/xtensa/op_helper.c
index 1af7becc54..03e2c1889a 100644
--- a/target/xtensa/op_helper.c
+++ b/target/xtensa/op_helper.c
@@ -26,12 +26,10 @@
*/
#include "qemu/osdep.h"
-#include "qemu/main-loop.h"
#include "cpu.h"
#include "exec/helper-proto.h"
#include "qemu/host-utils.h"
#include "exec/exec-all.h"
-#include "exec/cpu_ldst.h"
#include "qemu/timer.h"
#ifndef CONFIG_USER_ONLY
diff --git a/target/xtensa/win_helper.c b/target/xtensa/win_helper.c
index 5a1555360a..ec9ff44db0 100644
--- a/target/xtensa/win_helper.c
+++ b/target/xtensa/win_helper.c
@@ -27,7 +27,6 @@
#include "qemu/osdep.h"
#include "qemu/log.h"
-#include "qemu/main-loop.h"
#include "cpu.h"
#include "exec/helper-proto.h"
#include "qemu/host-utils.h"
--
2.41.0
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH 7/8] target/helper: Remove unnecessary 'qemu/main-loop.h' header
2023-08-28 14:55 ` [PATCH 7/8] target/helper: Remove unnecessary 'qemu/main-loop.h' header Philippe Mathieu-Daudé
@ 2023-08-28 18:40 ` Richard Henderson
2023-08-28 21:45 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 17+ messages in thread
From: Richard Henderson @ 2023-08-28 18:40 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: qemu-arm, qemu-s390x, qemu-ppc, qemu-riscv
On 8/28/23 07:55, Philippe Mathieu-Daudé wrote:
> "qemu/main-loop.h" declares functions related to QEMU's
> main loop mutex, which these files don't access. Remove
> the unused "qemu/main-loop.h" header.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> target/riscv/pmu.h | 2 --
> target/xtensa/mmu_helper.c | 2 --
> target/xtensa/op_helper.c | 2 --
At least these 3 files do two things.
r~
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 7/8] target/helper: Remove unnecessary 'qemu/main-loop.h' header
2023-08-28 18:40 ` Richard Henderson
@ 2023-08-28 21:45 ` Philippe Mathieu-Daudé
2023-08-28 21:46 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 17+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-08-28 21:45 UTC (permalink / raw)
To: Richard Henderson, qemu-devel; +Cc: qemu-arm, qemu-s390x, qemu-ppc, qemu-riscv
On 28/8/23 20:40, Richard Henderson wrote:
> On 8/28/23 07:55, Philippe Mathieu-Daudé wrote:
>> "qemu/main-loop.h" declares functions related to QEMU's
>> main loop mutex, which these files don't access. Remove
>> the unused "qemu/main-loop.h" header.
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> ---
>> target/riscv/pmu.h | 2 --
>> target/xtensa/mmu_helper.c | 2 --
>> target/xtensa/op_helper.c | 2 --
>
> At least these 3 files do two things.
I can compile these files adding '#error' in "qemu/main-loop.h".
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 7/8] target/helper: Remove unnecessary 'qemu/main-loop.h' header
2023-08-28 21:45 ` Philippe Mathieu-Daudé
@ 2023-08-28 21:46 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 17+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-08-28 21:46 UTC (permalink / raw)
To: Richard Henderson, qemu-devel; +Cc: qemu-arm, qemu-s390x, qemu-ppc, qemu-riscv
On 28/8/23 23:45, Philippe Mathieu-Daudé wrote:
> On 28/8/23 20:40, Richard Henderson wrote:
>> On 8/28/23 07:55, Philippe Mathieu-Daudé wrote:
>>> "qemu/main-loop.h" declares functions related to QEMU's
>>> main loop mutex, which these files don't access. Remove
>>> the unused "qemu/main-loop.h" header.
>>>
>>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>>> ---
>>> target/riscv/pmu.h | 2 --
>>> target/xtensa/mmu_helper.c | 2 --
>>> target/xtensa/op_helper.c | 2 --
>>
>> At least these 3 files do two things.
>
> I can compile these files adding '#error' in "qemu/main-loop.h".
Doh now I got it, I also remove "exec/cpu_ldst.h". Probably
a failed rebase, sorry...
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 8/8] target/mips: Remove unused headers in lcsr_helper.c
2023-08-28 14:55 [PATCH 0/8] target/translate: Remove unused "exec/cpu_ldst.h" / "qemu/main-loop.h" Philippe Mathieu-Daudé
` (6 preceding siblings ...)
2023-08-28 14:55 ` [PATCH 7/8] target/helper: Remove unnecessary 'qemu/main-loop.h' header Philippe Mathieu-Daudé
@ 2023-08-28 14:55 ` Philippe Mathieu-Daudé
2023-08-28 18:41 ` Richard Henderson
7 siblings, 1 reply; 17+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-08-28 14:55 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-arm, qemu-s390x, qemu-ppc, qemu-riscv,
Philippe Mathieu-Daudé
This files only access the address_space_ld/st API, declared
in "exec/cpu-all.h", already included by "cpu.h".
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/mips/tcg/sysemu/lcsr_helper.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/target/mips/tcg/sysemu/lcsr_helper.c b/target/mips/tcg/sysemu/lcsr_helper.c
index fb57bcbb78..25e03572fe 100644
--- a/target/mips/tcg/sysemu/lcsr_helper.c
+++ b/target/mips/tcg/sysemu/lcsr_helper.c
@@ -8,10 +8,7 @@
#include "qemu/osdep.h"
#include "cpu.h"
-#include "internal.h"
-#include "qemu/host-utils.h"
#include "exec/helper-proto.h"
-#include "exec/exec-all.h"
#define GET_MEMTXATTRS(cas) \
((MemTxAttrs){.requester_id = env_cpu(cas)->cpu_index})
--
2.41.0
^ permalink raw reply related [flat|nested] 17+ messages in thread