Skip to contentSkip to conversation

target/translate: Remove unused "exec/cpu_ldst.h" / "qemu/main-loop.h"

PATCH Superseded Philippe Mathieu-Daudé 2 participants 17 messages Aug 28, 2023 RISC-V

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover target/translate: Remove unused "exec/cpu_ldst.h" / "qemu/main-loop.h"

Yet another boring 'header cleanups' series :/

Philippe Mathieu-Daudé (8):
target/ppc/pmu: Include missing 'qemu/timer.h' header target/riscv/pmu: Restrict 'qemu/log.h' include to source target/translate: Include missing 'exec/cpu_ldst.h' header target/translate: Remove unnecessary 'exec/cpu_ldst.h' header target/translate: Restrict 'exec/cpu_ldst.h' to user emulation target/helpers: Remove unnecessary 'exec/cpu_ldst.h' header target/helper: Remove unnecessary 'qemu/main-loop.h' header target/mips: Remove unused headers in lcsr_helper.c

 include/exec/exec-all.h              | 2 +-
 target/riscv/pmu.h                   | 3 ---
 target/alpha/translate.c             | 1 -
 target/arm/ptw.c                     | 1 -
 target/avr/helper.c                  | 1 +
 target/cris/op_helper.c              | 1 -
 target/hexagon/translate.c           | 1 -
 target/hppa/translate.c              | 1 -
 target/i386/tcg/fpu_helper.c         | 1 +
 target/i386/tcg/sysemu/excp_helper.c | 1 +
 target/loongarch/cpu.c               | 1 +
 target/loongarch/iocsr_helper.c      | 1 -
 target/loongarch/op_helper.c         | 1 -
 target/m68k/translate.c              | 1 -
 target/microblaze/translate.c        | 1 -
 target/mips/tcg/fpu_helper.c         | 1 -
 target/mips/tcg/ldst_helper.c        | 1 +
 target/mips/tcg/msa_helper.c         | 1 +
 target/mips/tcg/sysemu/lcsr_helper.c | 5 -----
 target/nios2/op_helper.c             | 1 -
 target/nios2/translate.c             | 1 -
 target/openrisc/translate.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              | 2 +-
 target/ppc/translate.c               | 2 --
 target/riscv/csr.c                   | 1 -
 target/riscv/m128_helper.c           | 1 -
 target/riscv/op_helper.c             | 2 +-
 target/riscv/pmu.c                   | 1 +
 target/riscv/vector_helper.c         | 1 +
 target/s390x/tcg/crypto_helper.c     | 1 -
 target/s390x/tcg/excp_helper.c       | 1 -
 target/s390x/tcg/fpu_helper.c        | 1 -
 target/s390x/tcg/misc_helper.c       | 1 -
 target/sh4/translate.c               | 1 -
 target/sparc/translate.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 -
 45 files changed, 11 insertions(+), 46 deletions(-)
Signature · 1 line
2.41.0
#1 lore raw

PATCH 1/8 target/ppc/pmu: Include missing 'qemu/timer.h' header

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".

---
 target/ppc/power8-pmu.c | 1 +
 1 file changed, 1 insertion(+)
target/ppc/power8-pmu.c +1 -0
index 7bb4bf81f7..2537cded83 100644
@@ -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"
Signature · 1 line
2.41.0
#2 lore raw

PATCH 2/8 target/riscv/pmu: Restrict 'qemu/log.h' include to source

In reply to Philippe Mathieu-Daudé

Declarations from "riscv/pmu.h" don't need anything from "qemu/log.h", reduce it's inclusion to the source.

---
 target/riscv/pmu.h | 1 -
 target/riscv/pmu.c | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)
target/riscv/pmu.h +0 -1
index 0c819ca983..d2be06a133 100644
@@ -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"
target/riscv/pmu.c +1 -0
index db06b3882f..36f6307d28 100644
@@ -17,6 +17,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/log.h"
 #include "cpu.h"
 #include "pmu.h"
 #include "sysemu/cpu-timers.h"
Signature · 1 line
2.41.0
#3 lore raw

PATCH 3/8 target/translate: Include missing 'exec/cpu_ldst.h' header

In reply to Philippe Mathieu-Daudé

All these files access the CPU LD/ST API declared in "exec/cpu_ldst.h".

---
 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(+)
target/avr/helper.c +1 -0
index e6e7d51487..fdc9884ea0 100644
@@ -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"
 
target/i386/tcg/fpu_helper.c +1 -0
index 6f3741b635..4430d3d380 100644
@@ -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"
target/i386/tcg/sysemu/excp_helper.c +1 -0
index b5f0abffa3..226689a4f2 100644
@@ -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"
 
target/loongarch/cpu.c +1 -0
index 27fc6e1f33..65f9320e34 100644
@@ -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"
target/mips/tcg/ldst_helper.c +1 -0
index c1a8380e34..97056d00a2 100644
@@ -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"
 
target/mips/tcg/msa_helper.c +1 -0
index 29b31d70fe..c8597b9e30 100644
@@ -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"
target/riscv/op_helper.c +1 -0
index 9cdb9cdd06..7e2f1908ee 100644
@@ -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 */
target/riscv/vector_helper.c +1 -0
index 4d06754826..e3ef2113d6 100644
@@ -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"
Signature · 1 line
2.41.0
Reviewed-by on v1 3/8
#4 lore raw

Re: [PATCH 3/8] target/translate: Include missing 'exec/cpu_ldst.h' header

Quoted 13 lines · Philippe Mathieu-Daudé

All these files access the CPU LD/ST API declared in "exec/cpu_ldst.h".

---
  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(+)

r~

#5 lore raw

PATCH 4/8 target/translate: Remove unnecessary 'exec/cpu_ldst.h' header

In reply to 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.

---
 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(-)
target/alpha/translate.c +0 -1
index 846f3d8091..d73ed28da0 100644
@@ -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"
target/hexagon/translate.c +0 -1
index 708339198e..c00254e4d5 100644
@@ -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"
target/hppa/translate.c +0 -1
index d66fcb3e6a..e57ac57338 100644
@@ -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"
target/m68k/translate.c +0 -1
index e07161d76f..5e68159634 100644
@@ -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"
target/microblaze/translate.c +0 -1
index 7e7f837c63..d02c16296a 100644
@@ -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"
target/nios2/translate.c +0 -1
index 4264c7ec6b..dfc546d3bb 100644
@@ -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"
target/openrisc/translate.c +0 -1
index a86360d4f5..30ff63ac0b 100644
@@ -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"
target/ppc/translate.c +0 -1
index 74796ec7ba..49b6a757b7 100644
@@ -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"
target/sh4/translate.c +0 -1
index 49c87d7a01..c1e590feb3 100644
@@ -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"
target/sparc/translate.c +0 -1
index bd877a5e4a..3e108fb19a 100644
@@ -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"
 
Signature · 1 line
2.41.0
Reviewed-by on v1 4/8
#6 lore raw

Re: [PATCH 4/8] target/translate: Remove unnecessary 'exec/cpu_ldst.h' header

Quoted 5 lines · 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.

Quoted 12 lines
---
  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(-)

r~

#7 lore raw

PATCH 5/8 target/translate: Restrict 'exec/cpu_ldst.h' to user emulation

In reply to Philippe Mathieu-Daudé

Only handle_sigsegv_accerr_write(), declared with user emulation, requires "exec/cpu_ldst.h" (for the abi_ptr typedef).

---
 include/exec/exec-all.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/exec/exec-all.h +1 -1
index d02517e95f..b2f5cd4c2a 100644
@@ -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"
Signature · 1 line
2.41.0
Reviewed-by on v1 5/8
#8 lore raw

Re: [PATCH 5/8] target/translate: Restrict 'exec/cpu_ldst.h' to user emulation

Quoted 8 lines · Philippe Mathieu-Daudé

Only handle_sigsegv_accerr_write(), declared with user emulation, requires "exec/cpu_ldst.h" (for the abi_ptr typedef).

---
  include/exec/exec-all.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

r~

#9 lore raw

PATCH 6/8 target/helpers: Remove unnecessary 'exec/cpu_ldst.h' header

In reply to Philippe Mathieu-Daudé

These files don't use the CPU ld/st API, remove the unnecessary "exec/cpu_ldst.h" header.

---
 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(-)
target/cris/op_helper.c +0 -1
index 40cb74ce73..98a9aaf504 100644
@@ -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
 
target/mips/tcg/fpu_helper.c +0 -1
index 8ce56ed7c8..45d593de48 100644
@@ -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"
 
target/mips/tcg/sysemu/lcsr_helper.c +0 -1
index 942143d209..8f97d04313 100644
@@ -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})
target/s390x/tcg/excp_helper.c +0 -1
index b7116d0577..b875bf14e5 100644
@@ -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
target/s390x/tcg/fpu_helper.c +0 -1
index c329b31261..d8bd5748fa 100644
@@ -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"
 
Signature · 1 line
2.41.0
Reviewed-by on v1 6/8
#10 lore raw

Re: [PATCH 6/8] target/helpers: Remove unnecessary 'exec/cpu_ldst.h' header

Quoted 11 lines · Philippe Mathieu-Daudé

These files don't use the CPU ld/st API, remove the unnecessary "exec/cpu_ldst.h" header.

---
  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(-)

r~

#11 lore raw

PATCH 7/8 target/helper: Remove unnecessary 'qemu/main-loop.h' header

In reply to 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.

---
 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(-)
target/riscv/pmu.h +0 -2
index d2be06a133..2bfb71ba87 100644
@@ -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);
target/arm/ptw.c +0 -1
index bfbab26b9b..a4b0172df3 100644
@@ -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"
target/loongarch/iocsr_helper.c +0 -1
index dda9845d6c..6cd01d5f09 100644
@@ -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"
target/loongarch/op_helper.c +0 -1
index cf84f20aba..fe79c62fa4 100644
@@ -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"
target/mips/tcg/sysemu/lcsr_helper.c +0 -1
index 8f97d04313..fb57bcbb78 100644
@@ -7,7 +7,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "qemu/main-loop.h"
 #include "cpu.h"
 #include "internal.h"
 #include "qemu/host-utils.h"
target/nios2/op_helper.c +0 -1
index 0aaf33ffc2..5017457c5e 100644
@@ -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)
 {
target/ppc/int_helper.c +0 -1
index 834da80fe3..96cdb3c7e3 100644
@@ -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"
target/ppc/machine.c +0 -1
index 134b16c625..1270a1f7fc 100644
@@ -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"
 
target/ppc/mem_helper.c +0 -1
index 46eae65819..c7535481d6 100644
@@ -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"
target/ppc/mmu_common.c +0 -1
index 8c000e250d..6ca5d12207 100644
@@ -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"
target/ppc/mmu_helper.c +0 -1
index d3ea7588f9..f87d35379a 100644
@@ -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"
target/ppc/power8-pmu.c +0 -1
index 2537cded83..cbc5889d91 100644
@@ -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"
 
target/ppc/translate.c +0 -1
index 49b6a757b7..7111b34030 100644
@@ -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"
target/riscv/csr.c +0 -1
index ea7585329e..de31818daa 100644
@@ -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"
target/riscv/m128_helper.c +0 -1
index e6a4f6120a..ec14aaa901 100644
@@ -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"
 
target/riscv/op_helper.c +0 -1
index 7e2f1908ee..5355225d56 100644
@@ -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"
target/s390x/tcg/crypto_helper.c +0 -1
index 762b277884..93aabd236f 100644
@@ -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"
target/s390x/tcg/misc_helper.c +0 -1
index 576157b1f3..e85658ce22 100644
@@ -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"
target/xtensa/dbg_helper.c +0 -1
index ce2a820c60..3e0c9e8e8b 100644
@@ -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"
target/xtensa/fpu_helper.c +0 -1
index d2a10cc797..381e83ded8 100644
@@ -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"
target/xtensa/mmu_helper.c +0 -2
index fa66e8e867..12552a3347 100644
@@ -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
target/xtensa/op_helper.c +0 -2
index 1af7becc54..03e2c1889a 100644
@@ -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
target/xtensa/win_helper.c +0 -1
index 5a1555360a..ec9ff44db0 100644
@@ -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"
Signature · 1 line
2.41.0
#12 lore raw

Re: [PATCH 7/8] target/helper: Remove unnecessary 'qemu/main-loop.h' header

Quoted 9 lines · 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.

---
  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~

#13 lore raw

Re: [PATCH 7/8] target/helper: Remove unnecessary 'qemu/main-loop.h' header

Quoted 5 lines · Richard Henderson
Quoted 4 lines · 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.

Quoted 7 lines
Quoted 5 lines

---
  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".

#14 lore raw

Re: [PATCH 7/8] target/helper: Remove unnecessary 'qemu/main-loop.h' header

Quoted 12 lines · Philippe Mathieu-Daudé
Quoted 11 lines · Richard Henderson
Quoted 9 lines · 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.

---
  target/riscv/pmu.h                   | 2 --
  target/xtensa/mmu_helper.c           | 2 --
  target/xtensa/op_helper.c            | 2 --

Quoted 3 lines
Quoted 1 line

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...

#15 lore raw

PATCH 8/8 target/mips: Remove unused headers in lcsr_helper.c

In reply to Philippe Mathieu-Daudé

This files only access the address_space_ld/st API, declared in "exec/cpu-all.h", already included by "cpu.h".

---
 target/mips/tcg/sysemu/lcsr_helper.c | 3 ---
 1 file changed, 3 deletions(-)
target/mips/tcg/sysemu/lcsr_helper.c +0 -3
index fb57bcbb78..25e03572fe 100644
@@ -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})
Signature · 1 line
2.41.0