All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/10] exec: Remove 'qemu/log.h' from 'exec-all.h'
@ 2022-02-03 19:37 Philippe Mathieu-Daudé via
  2022-02-03 19:37 ` [PATCH 01/10] hw/tpm: Clean includes Philippe Mathieu-Daudé via
                   ` (9 more replies)
  0 siblings, 10 replies; 33+ messages in thread
From: Philippe Mathieu-Daudé via @ 2022-02-03 19:37 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, Richard Henderson, Thomas Huth,
	Philippe Mathieu-Daudé

Yet another noisy/boring refactor, but it will allow us to better
split exec/ includes as being target-agnostic/specific (the next
series).

Based-on: <20220203191814.45023-1-f4bug@amsat.org>
"softmmu: Make various objects target agnostic"

Philippe Mathieu-Daudé (10):
  hw/tpm: Clean includes
  hw/remote: Add missing include
  hw/s390x/virtio: Add missing 'cpu.h' include
  hw/acpi/memory_hotplug: Remove unused 'hw/acpi/pc-hotplug.h' header
  qtest: Add missing 'hw/qdev-core.h' include
  exec/ramblock: Add missing includes
  core/ptimers: Remove unnecessary 'sysemu/cpus.h' include
  target: Add missing "qemu/timer.h" include
  linux-user: Add missing "qemu/timer.h" include
  exec/exec-all: Move 'qemu/log.h' include in units requiring it

 bsd-user/signal.c                       | 1 +
 hw/acpi/memory_hotplug.c                | 1 -
 hw/arm/omap1.c                          | 1 +
 hw/core/ptimer.c                        | 1 -
 hw/display/omap_dss.c                   | 1 +
 hw/gpio/omap_gpio.c                     | 1 +
 hw/input/tsc210x.c                      | 1 +
 hw/remote/proxy-memory-listener.c       | 1 +
 hw/s390x/s390-virtio-hcall.h            | 1 +
 hw/tpm/tpm_crb.c                        | 1 +
 hw/tpm/tpm_ppi.c                        | 4 ++--
 hw/tpm/tpm_ppi.h                        | 4 ++--
 include/exec/exec-all.h                 | 2 --
 include/exec/ramblock.h                 | 2 ++
 linux-user/i386/cpu_loop.c              | 1 +
 linux-user/ppc/cpu_loop.c               | 1 +
 monitor/misc.c                          | 1 +
 plugins/api.c                           | 1 +
 softmmu/qtest.c                         | 1 +
 softmmu/runstate.c                      | 1 +
 target/alpha/helper.c                   | 2 +-
 target/arm/cpu.c                        | 1 +
 target/arm/helper.c                     | 2 ++
 target/arm/m_helper.c                   | 1 +
 target/arm/mte_helper.c                 | 1 +
 target/avr/helper.c                     | 1 +
 target/cris/helper.c                    | 1 +
 target/hexagon/internal.h               | 2 ++
 target/hppa/cpu.c                       | 1 +
 target/hppa/helper.c                    | 2 +-
 target/hppa/mem_helper.c                | 1 +
 target/hppa/op_helper.c                 | 1 +
 target/i386/helper.c                    | 1 +
 target/i386/tcg/int_helper.c            | 1 +
 target/i386/tcg/misc_helper.c           | 1 +
 target/i386/tcg/sysemu/seg_helper.c     | 1 +
 target/i386/tcg/sysemu/svm_helper.c     | 1 +
 target/m68k/op_helper.c                 | 1 +
 target/microblaze/cpu.c                 | 1 +
 target/microblaze/mmu.c                 | 1 +
 target/microblaze/op_helper.c           | 1 +
 target/mips/tcg/exception.c             | 1 +
 target/mips/tcg/sysemu/special_helper.c | 1 +
 target/mips/tcg/translate.h             | 1 +
 target/openrisc/interrupt.c             | 1 +
 target/openrisc/mmu.c                   | 1 +
 target/ppc/excp_helper.c                | 1 +
 target/ppc/misc_helper.c                | 1 +
 target/riscv/csr.c                      | 1 +
 target/s390x/tcg/excp_helper.c          | 1 +
 target/s390x/tcg/mem_helper.c           | 1 +
 target/sparc/helper.c                   | 1 +
 target/sparc/ldst_helper.c              | 1 +
 target/sparc/mmu_helper.c               | 1 +
 target/tricore/helper.c                 | 2 +-
 target/xtensa/dbg_helper.c              | 1 +
 target/xtensa/exc_helper.c              | 1 +
 target/xtensa/fpu_helper.c              | 1 +
 target/xtensa/helper.c                  | 1 +
 target/xtensa/mmu_helper.c              | 1 +
 target/xtensa/win_helper.c              | 1 +
 61 files changed, 63 insertions(+), 11 deletions(-)

-- 
2.34.1



^ permalink raw reply	[flat|nested] 33+ messages in thread

* [PATCH 01/10] hw/tpm: Clean includes
  2022-02-03 19:37 [PATCH 00/10] exec: Remove 'qemu/log.h' from 'exec-all.h' Philippe Mathieu-Daudé via
@ 2022-02-03 19:37 ` Philippe Mathieu-Daudé via
  2022-02-04 15:03   ` Thomas Huth
  2022-02-05 23:48   ` Richard Henderson
  2022-02-03 19:37 ` [PATCH 02/10] hw/remote: Add missing include Philippe Mathieu-Daudé via
                   ` (8 subsequent siblings)
  9 siblings, 2 replies; 33+ messages in thread
From: Philippe Mathieu-Daudé via @ 2022-02-03 19:37 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, Richard Henderson, Thomas Huth,
	Philippe Mathieu-Daudé

"tpm_ppi.h" only requires to include "exec/memory.h" to get
the MemoryRegion declaration.

tpm_ppi.c requires "hw/qdev-core.h" to use the DEVICE() macro,
tpm_crb.c is the only source file requiring "exec/address-spaces.h".

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/tpm/tpm_crb.c | 1 +
 hw/tpm/tpm_ppi.c | 4 ++--
 hw/tpm/tpm_ppi.h | 4 ++--
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/hw/tpm/tpm_crb.c b/hw/tpm/tpm_crb.c
index 58ebd1469c..aa9c00aad3 100644
--- a/hw/tpm/tpm_crb.c
+++ b/hw/tpm/tpm_crb.c
@@ -18,6 +18,7 @@
 
 #include "qemu/module.h"
 #include "qapi/error.h"
+#include "exec/address-spaces.h"
 #include "hw/qdev-properties.h"
 #include "hw/pci/pci_ids.h"
 #include "hw/acpi/tpm.h"
diff --git a/hw/tpm/tpm_ppi.c b/hw/tpm/tpm_ppi.c
index 274e9aa4b0..6dbb9f41e4 100644
--- a/hw/tpm/tpm_ppi.c
+++ b/hw/tpm/tpm_ppi.c
@@ -14,9 +14,9 @@
 #include "qemu/osdep.h"
 
 #include "qapi/error.h"
-#include "cpu.h"
 #include "sysemu/memory_mapping.h"
 #include "migration/vmstate.h"
+#include "hw/qdev-core.h"
 #include "hw/acpi/tpm.h"
 #include "tpm_ppi.h"
 #include "trace.h"
@@ -44,7 +44,7 @@ void tpm_ppi_reset(TPMPPI *tpmppi)
     }
 }
 
-void tpm_ppi_init(TPMPPI *tpmppi, struct MemoryRegion *m,
+void tpm_ppi_init(TPMPPI *tpmppi, MemoryRegion *m,
                   hwaddr addr, Object *obj)
 {
     tpmppi->buf = qemu_memalign(qemu_real_host_page_size,
diff --git a/hw/tpm/tpm_ppi.h b/hw/tpm/tpm_ppi.h
index 6f773c25a0..bf5d4a300f 100644
--- a/hw/tpm/tpm_ppi.h
+++ b/hw/tpm/tpm_ppi.h
@@ -12,7 +12,7 @@
 #ifndef TPM_TPM_PPI_H
 #define TPM_TPM_PPI_H
 
-#include "exec/address-spaces.h"
+#include "exec/memory.h"
 
 typedef struct TPMPPI {
     MemoryRegion ram;
@@ -29,7 +29,7 @@ typedef struct TPMPPI {
  * Register the TPM PPI memory region at @addr on the given address
  * space for the object @obj.
  **/
-void tpm_ppi_init(TPMPPI *tpmppi, struct MemoryRegion *m,
+void tpm_ppi_init(TPMPPI *tpmppi, MemoryRegion *m,
                   hwaddr addr, Object *obj);
 
 /**
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 02/10] hw/remote: Add missing include
  2022-02-03 19:37 [PATCH 00/10] exec: Remove 'qemu/log.h' from 'exec-all.h' Philippe Mathieu-Daudé via
  2022-02-03 19:37 ` [PATCH 01/10] hw/tpm: Clean includes Philippe Mathieu-Daudé via
@ 2022-02-03 19:37 ` Philippe Mathieu-Daudé via
  2022-02-04 15:16   ` Thomas Huth
  2022-02-05 23:48   ` Richard Henderson
  2022-02-03 19:37 ` [PATCH 03/10] hw/s390x/virtio: Add missing 'cpu.h' include Philippe Mathieu-Daudé via
                   ` (7 subsequent siblings)
  9 siblings, 2 replies; 33+ messages in thread
From: Philippe Mathieu-Daudé via @ 2022-02-03 19:37 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, Richard Henderson, Thomas Huth,
	Philippe Mathieu-Daudé,
	Jagannathan Raman

Currently "qemu/error-report.h" is implicitly included, however
if headers in include/ get refactored, we get:

  hw/remote/proxy-memory-listener.c: In function ‘proxy_memory_listener_commit’:
  hw/remote/proxy-memory-listener.c:183:9: error: implicit declaration of function ‘error_report’; did you mean ‘error_report_err’? [-Werror=implicit-function-declaration]
    183 |         error_report("Number of fds is more than %d", REMOTE_MAX_FDS);
        |         ^~~~~~~~~~~~
        |         error_report_err

Add the missing "qemu/error-report.h" header to avoid that.

Reviewed-by: Jagannathan Raman <jag.raman@oracle.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/remote/proxy-memory-listener.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/remote/proxy-memory-listener.c b/hw/remote/proxy-memory-listener.c
index 882c9b4854..0e893f3189 100644
--- a/hw/remote/proxy-memory-listener.c
+++ b/hw/remote/proxy-memory-listener.c
@@ -16,6 +16,7 @@
 #include "exec/cpu-common.h"
 #include "exec/ram_addr.h"
 #include "qapi/error.h"
+#include "qemu/error-report.h"
 #include "hw/remote/mpqemu-link.h"
 #include "hw/remote/proxy-memory-listener.h"
 
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 03/10] hw/s390x/virtio: Add missing 'cpu.h' include
  2022-02-03 19:37 [PATCH 00/10] exec: Remove 'qemu/log.h' from 'exec-all.h' Philippe Mathieu-Daudé via
  2022-02-03 19:37 ` [PATCH 01/10] hw/tpm: Clean includes Philippe Mathieu-Daudé via
  2022-02-03 19:37 ` [PATCH 02/10] hw/remote: Add missing include Philippe Mathieu-Daudé via
@ 2022-02-03 19:37 ` Philippe Mathieu-Daudé via
  2022-02-04  7:50   ` Thomas Huth
                     ` (2 more replies)
  2022-02-03 19:37 ` [PATCH 04/10] hw/acpi/memory_hotplug: Remove unused 'hw/acpi/pc-hotplug.h' header Philippe Mathieu-Daudé via
                   ` (6 subsequent siblings)
  9 siblings, 3 replies; 33+ messages in thread
From: Philippe Mathieu-Daudé via @ 2022-02-03 19:37 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, Richard Henderson, Thomas Huth,
	Philippe Mathieu-Daudé

CPUS390XState is declared in "cpu.h".

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/s390x/s390-virtio-hcall.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/s390x/s390-virtio-hcall.h b/hw/s390x/s390-virtio-hcall.h
index 9800c4b351..9773ed8a21 100644
--- a/hw/s390x/s390-virtio-hcall.h
+++ b/hw/s390x/s390-virtio-hcall.h
@@ -13,6 +13,7 @@
 #define HW_S390_VIRTIO_HCALL_H
 
 #include "standard-headers/asm-s390/virtio-ccw.h"
+#include "cpu.h"
 
 /* The only thing that we need from the old kvm_virtio.h file */
 #define KVM_S390_VIRTIO_NOTIFY 0
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 04/10] hw/acpi/memory_hotplug: Remove unused 'hw/acpi/pc-hotplug.h' header
  2022-02-03 19:37 [PATCH 00/10] exec: Remove 'qemu/log.h' from 'exec-all.h' Philippe Mathieu-Daudé via
                   ` (2 preceding siblings ...)
  2022-02-03 19:37 ` [PATCH 03/10] hw/s390x/virtio: Add missing 'cpu.h' include Philippe Mathieu-Daudé via
@ 2022-02-03 19:37 ` Philippe Mathieu-Daudé via
  2022-02-04 12:11   ` Igor Mammedov
  2022-02-03 19:37 ` [PATCH 05/10] qtest: Add missing 'hw/qdev-core.h' include Philippe Mathieu-Daudé via
                   ` (5 subsequent siblings)
  9 siblings, 1 reply; 33+ messages in thread
From: Philippe Mathieu-Daudé via @ 2022-02-03 19:37 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, Richard Henderson, Thomas Huth,
	Philippe Mathieu-Daudé

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/acpi/memory_hotplug.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/hw/acpi/memory_hotplug.c b/hw/acpi/memory_hotplug.c
index a581a2183b..0a7e89a13e 100644
--- a/hw/acpi/memory_hotplug.c
+++ b/hw/acpi/memory_hotplug.c
@@ -1,6 +1,5 @@
 #include "qemu/osdep.h"
 #include "hw/acpi/memory_hotplug.h"
-#include "hw/acpi/pc-hotplug.h"
 #include "hw/mem/pc-dimm.h"
 #include "hw/qdev-core.h"
 #include "migration/vmstate.h"
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 05/10] qtest: Add missing 'hw/qdev-core.h' include
  2022-02-03 19:37 [PATCH 00/10] exec: Remove 'qemu/log.h' from 'exec-all.h' Philippe Mathieu-Daudé via
                   ` (3 preceding siblings ...)
  2022-02-03 19:37 ` [PATCH 04/10] hw/acpi/memory_hotplug: Remove unused 'hw/acpi/pc-hotplug.h' header Philippe Mathieu-Daudé via
@ 2022-02-03 19:37 ` Philippe Mathieu-Daudé via
  2022-02-04 14:56   ` Thomas Huth
  2022-02-05 23:50   ` Richard Henderson
  2022-02-03 19:37 ` [PATCH 06/10] exec/ramblock: Add missing includes Philippe Mathieu-Daudé via
                   ` (4 subsequent siblings)
  9 siblings, 2 replies; 33+ messages in thread
From: Philippe Mathieu-Daudé via @ 2022-02-03 19:37 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, Richard Henderson, Thomas Huth,
	Philippe Mathieu-Daudé

Add "hw/qdev-core.h" to avoid when refactoring include/:

  softmmu/qtest.c:404:9: error: use of undeclared identifier 'NamedGPIOList'
        NamedGPIOList *ngl;
        ^

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 softmmu/qtest.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/softmmu/qtest.c b/softmmu/qtest.c
index 72751e1fd8..8b7cb6aa8e 100644
--- a/softmmu/qtest.c
+++ b/softmmu/qtest.c
@@ -19,6 +19,7 @@
 #include "chardev/char-fe.h"
 #include "exec/ioport.h"
 #include "exec/memory.h"
+#include "hw/qdev-core.h"
 #include "hw/irq.h"
 #include "qemu/accel.h"
 #include "sysemu/cpu-timers.h"
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 06/10] exec/ramblock: Add missing includes
  2022-02-03 19:37 [PATCH 00/10] exec: Remove 'qemu/log.h' from 'exec-all.h' Philippe Mathieu-Daudé via
                   ` (4 preceding siblings ...)
  2022-02-03 19:37 ` [PATCH 05/10] qtest: Add missing 'hw/qdev-core.h' include Philippe Mathieu-Daudé via
@ 2022-02-03 19:37 ` Philippe Mathieu-Daudé via
  2022-02-04 14:59   ` Thomas Huth
  2022-02-05 23:50   ` Richard Henderson
  2022-02-03 19:38 ` [PATCH 07/10] core/ptimers: Remove unnecessary 'sysemu/cpus.h' include Philippe Mathieu-Daudé via
                   ` (3 subsequent siblings)
  9 siblings, 2 replies; 33+ messages in thread
From: Philippe Mathieu-Daudé via @ 2022-02-03 19:37 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, Richard Henderson, Thomas Huth,
	Philippe Mathieu-Daudé

Add missing includes to avoid when refactoring include/

  include/exec/ramblock.h:26:21: error: field has incomplete type 'struct rcu_head'
    struct rcu_head rcu;
                    ^

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 include/exec/ramblock.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/exec/ramblock.h b/include/exec/ramblock.h
index 664701b759..6cbedf9e0c 100644
--- a/include/exec/ramblock.h
+++ b/include/exec/ramblock.h
@@ -21,6 +21,8 @@
 
 #ifndef CONFIG_USER_ONLY
 #include "cpu-common.h"
+#include "qemu/rcu.h"
+#include "exec/ramlist.h"
 
 struct RAMBlock {
     struct rcu_head rcu;
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 07/10] core/ptimers: Remove unnecessary 'sysemu/cpus.h' include
  2022-02-03 19:37 [PATCH 00/10] exec: Remove 'qemu/log.h' from 'exec-all.h' Philippe Mathieu-Daudé via
                   ` (5 preceding siblings ...)
  2022-02-03 19:37 ` [PATCH 06/10] exec/ramblock: Add missing includes Philippe Mathieu-Daudé via
@ 2022-02-03 19:38 ` Philippe Mathieu-Daudé via
  2022-02-04 15:21   ` Thomas Huth
  2022-02-05 23:51   ` Richard Henderson
  2022-02-03 19:38 ` [PATCH 08/10] target: Add missing "qemu/timer.h" include Philippe Mathieu-Daudé via
                   ` (2 subsequent siblings)
  9 siblings, 2 replies; 33+ messages in thread
From: Philippe Mathieu-Daudé via @ 2022-02-03 19:38 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, Richard Henderson, Thomas Huth,
	Philippe Mathieu-Daudé

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/core/ptimer.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/hw/core/ptimer.c b/hw/core/ptimer.c
index 6ba19fd965..eb5ba1aff7 100644
--- a/hw/core/ptimer.c
+++ b/hw/core/ptimer.c
@@ -14,7 +14,6 @@
 #include "sysemu/cpu-timers.h"
 #include "sysemu/qtest.h"
 #include "block/aio.h"
-#include "sysemu/cpus.h"
 #include "hw/clock.h"
 
 #define DELTA_ADJUST     1
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 08/10] target: Add missing "qemu/timer.h" include
  2022-02-03 19:37 [PATCH 00/10] exec: Remove 'qemu/log.h' from 'exec-all.h' Philippe Mathieu-Daudé via
                   ` (6 preceding siblings ...)
  2022-02-03 19:38 ` [PATCH 07/10] core/ptimers: Remove unnecessary 'sysemu/cpus.h' include Philippe Mathieu-Daudé via
@ 2022-02-03 19:38 ` Philippe Mathieu-Daudé via
  2022-02-04 15:29   ` Thomas Huth
                     ` (2 more replies)
  2022-02-03 19:38 ` [PATCH 09/10] linux-user: " Philippe Mathieu-Daudé via
  2022-02-03 19:38 ` [PATCH 10/10] exec/exec-all: Move 'qemu/log.h' include in units requiring it Philippe Mathieu-Daudé via
  9 siblings, 3 replies; 33+ messages in thread
From: Philippe Mathieu-Daudé via @ 2022-02-03 19:38 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, Richard Henderson, Thomas Huth,
	Philippe Mathieu-Daudé

cpu_get_host_ticks() and NANOSECONDS_PER_SECOND are declared
in "qemu/timer.h".

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 target/arm/cpu.c      | 1 +
 target/arm/helper.c   | 1 +
 target/hppa/cpu.c     | 1 +
 target/riscv/csr.c    | 1 +
 target/sparc/helper.c | 1 +
 5 files changed, 5 insertions(+)

diff --git a/target/arm/cpu.c b/target/arm/cpu.c
index cdbc4cdd01..9555f6707b 100644
--- a/target/arm/cpu.c
+++ b/target/arm/cpu.c
@@ -20,6 +20,7 @@
 
 #include "qemu/osdep.h"
 #include "qemu/qemu-print.h"
+#include "qemu/timer.h"
 #include "qemu-common.h"
 #include "target/arm/idau.h"
 #include "qemu/module.h"
diff --git a/target/arm/helper.c b/target/arm/helper.c
index 6dd241fbef..e39faa2a98 100644
--- a/target/arm/helper.c
+++ b/target/arm/helper.c
@@ -15,6 +15,7 @@
 #include "exec/helper-proto.h"
 #include "qemu/host-utils.h"
 #include "qemu/main-loop.h"
+#include "qemu/timer.h"
 #include "qemu/bitops.h"
 #include "qemu/crc32c.h"
 #include "qemu/qemu-print.h"
diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c
index 37b763fca0..5f46ba801e 100644
--- a/target/hppa/cpu.c
+++ b/target/hppa/cpu.c
@@ -21,6 +21,7 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "qemu/qemu-print.h"
+#include "qemu/timer.h"
 #include "cpu.h"
 #include "qemu/module.h"
 #include "exec/exec-all.h"
diff --git a/target/riscv/csr.c b/target/riscv/csr.c
index a4db40769b..45f04c701a 100644
--- a/target/riscv/csr.c
+++ b/target/riscv/csr.c
@@ -19,6 +19,7 @@
 
 #include "qemu/osdep.h"
 #include "qemu/log.h"
+#include "qemu/timer.h"
 #include "cpu.h"
 #include "qemu/main-loop.h"
 #include "exec/exec-all.h"
diff --git a/target/sparc/helper.c b/target/sparc/helper.c
index c7bcaa3a20..c4358bba84 100644
--- a/target/sparc/helper.c
+++ b/target/sparc/helper.c
@@ -20,6 +20,7 @@
 #include "qemu/osdep.h"
 #include "cpu.h"
 #include "exec/exec-all.h"
+#include "qemu/timer.h"
 #include "qemu/host-utils.h"
 #include "exec/helper-proto.h"
 
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 09/10] linux-user: Add missing "qemu/timer.h" include
  2022-02-03 19:37 [PATCH 00/10] exec: Remove 'qemu/log.h' from 'exec-all.h' Philippe Mathieu-Daudé via
                   ` (7 preceding siblings ...)
  2022-02-03 19:38 ` [PATCH 08/10] target: Add missing "qemu/timer.h" include Philippe Mathieu-Daudé via
@ 2022-02-03 19:38 ` Philippe Mathieu-Daudé via
  2022-02-04 15:30   ` Thomas Huth
  2022-02-05 23:54   ` Richard Henderson
  2022-02-03 19:38 ` [PATCH 10/10] exec/exec-all: Move 'qemu/log.h' include in units requiring it Philippe Mathieu-Daudé via
  9 siblings, 2 replies; 33+ messages in thread
From: Philippe Mathieu-Daudé via @ 2022-02-03 19:38 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, Richard Henderson, Thomas Huth,
	Philippe Mathieu-Daudé

"qemu/timer.h" declares cpu_get_host_ticks().

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 linux-user/i386/cpu_loop.c | 1 +
 linux-user/ppc/cpu_loop.c  | 1 +
 2 files changed, 2 insertions(+)

diff --git a/linux-user/i386/cpu_loop.c b/linux-user/i386/cpu_loop.c
index 29dfd7cd0c..90bffc1956 100644
--- a/linux-user/i386/cpu_loop.c
+++ b/linux-user/i386/cpu_loop.c
@@ -20,6 +20,7 @@
 #include "qemu/osdep.h"
 #include "qemu-common.h"
 #include "qemu.h"
+#include "qemu/timer.h"
 #include "user-internals.h"
 #include "cpu_loop-common.h"
 #include "signal-common.h"
diff --git a/linux-user/ppc/cpu_loop.c b/linux-user/ppc/cpu_loop.c
index 46e6ffd6d3..ffe39851ed 100644
--- a/linux-user/ppc/cpu_loop.c
+++ b/linux-user/ppc/cpu_loop.c
@@ -20,6 +20,7 @@
 #include "qemu/osdep.h"
 #include "qemu-common.h"
 #include "qemu.h"
+#include "qemu/timer.h"
 #include "user-internals.h"
 #include "cpu_loop-common.h"
 #include "signal-common.h"
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 10/10] exec/exec-all: Move 'qemu/log.h' include in units requiring it
  2022-02-03 19:37 [PATCH 00/10] exec: Remove 'qemu/log.h' from 'exec-all.h' Philippe Mathieu-Daudé via
                   ` (8 preceding siblings ...)
  2022-02-03 19:38 ` [PATCH 09/10] linux-user: " Philippe Mathieu-Daudé via
@ 2022-02-03 19:38 ` Philippe Mathieu-Daudé via
  2022-02-04 15:33   ` Thomas Huth
  2022-02-05 23:57   ` Richard Henderson
  9 siblings, 2 replies; 33+ messages in thread
From: Philippe Mathieu-Daudé via @ 2022-02-03 19:38 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, Richard Henderson, Thomas Huth,
	Philippe Mathieu-Daudé

Many files use "qemu/log.h" declarations but neglect to include
it (they inherit it via "exec/exec-all.h"). "exec/exec-all.h" is
a core component and shouldn't be used that way. Move the
"qemu/log.h" inclusion locally to each unit requiring it.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 bsd-user/signal.c                       | 1 +
 hw/arm/omap1.c                          | 1 +
 hw/display/omap_dss.c                   | 1 +
 hw/gpio/omap_gpio.c                     | 1 +
 hw/input/tsc210x.c                      | 1 +
 include/exec/exec-all.h                 | 2 --
 monitor/misc.c                          | 1 +
 plugins/api.c                           | 1 +
 softmmu/runstate.c                      | 1 +
 target/alpha/helper.c                   | 2 +-
 target/arm/helper.c                     | 1 +
 target/arm/m_helper.c                   | 1 +
 target/arm/mte_helper.c                 | 1 +
 target/avr/helper.c                     | 1 +
 target/cris/helper.c                    | 1 +
 target/hexagon/internal.h               | 2 ++
 target/hppa/helper.c                    | 2 +-
 target/hppa/mem_helper.c                | 1 +
 target/hppa/op_helper.c                 | 1 +
 target/i386/helper.c                    | 1 +
 target/i386/tcg/int_helper.c            | 1 +
 target/i386/tcg/misc_helper.c           | 1 +
 target/i386/tcg/sysemu/seg_helper.c     | 1 +
 target/i386/tcg/sysemu/svm_helper.c     | 1 +
 target/m68k/op_helper.c                 | 1 +
 target/microblaze/cpu.c                 | 1 +
 target/microblaze/mmu.c                 | 1 +
 target/microblaze/op_helper.c           | 1 +
 target/mips/tcg/exception.c             | 1 +
 target/mips/tcg/sysemu/special_helper.c | 1 +
 target/mips/tcg/translate.h             | 1 +
 target/openrisc/interrupt.c             | 1 +
 target/openrisc/mmu.c                   | 1 +
 target/ppc/excp_helper.c                | 1 +
 target/ppc/misc_helper.c                | 1 +
 target/s390x/tcg/excp_helper.c          | 1 +
 target/s390x/tcg/mem_helper.c           | 1 +
 target/sparc/ldst_helper.c              | 1 +
 target/sparc/mmu_helper.c               | 1 +
 target/tricore/helper.c                 | 2 +-
 target/xtensa/dbg_helper.c              | 1 +
 target/xtensa/exc_helper.c              | 1 +
 target/xtensa/fpu_helper.c              | 1 +
 target/xtensa/helper.c                  | 1 +
 target/xtensa/mmu_helper.c              | 1 +
 target/xtensa/win_helper.c              | 1 +
 46 files changed, 46 insertions(+), 5 deletions(-)

diff --git a/bsd-user/signal.c b/bsd-user/signal.c
index 0bc6d2edbd..8a36b696d8 100644
--- a/bsd-user/signal.c
+++ b/bsd-user/signal.c
@@ -19,6 +19,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/log.h"
 #include "qemu.h"
 #include "signal-common.h"
 #include "trace.h"
diff --git a/hw/arm/omap1.c b/hw/arm/omap1.c
index 9852c2a07e..f693faa43e 100644
--- a/hw/arm/omap1.c
+++ b/hw/arm/omap1.c
@@ -18,6 +18,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/log.h"
 #include "qemu/error-report.h"
 #include "qemu/main-loop.h"
 #include "qapi/error.h"
diff --git a/hw/display/omap_dss.c b/hw/display/omap_dss.c
index 21fde58a26..8c0e9ee700 100644
--- a/hw/display/omap_dss.c
+++ b/hw/display/omap_dss.c
@@ -19,6 +19,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/log.h"
 #include "hw/hw.h"
 #include "hw/irq.h"
 #include "ui/console.h"
diff --git a/hw/gpio/omap_gpio.c b/hw/gpio/omap_gpio.c
index e25084b40c..bd0841d57f 100644
--- a/hw/gpio/omap_gpio.c
+++ b/hw/gpio/omap_gpio.c
@@ -19,6 +19,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/log.h"
 #include "hw/irq.h"
 #include "hw/qdev-properties.h"
 #include "hw/arm/omap.h"
diff --git a/hw/input/tsc210x.c b/hw/input/tsc210x.c
index 182d3725fc..b0d5c2dd74 100644
--- a/hw/input/tsc210x.c
+++ b/hw/input/tsc210x.c
@@ -20,6 +20,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/log.h"
 #include "hw/hw.h"
 #include "audio/audio.h"
 #include "qemu/timer.h"
diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h
index 199fd49e5d..d2cb0981f4 100644
--- a/include/exec/exec-all.h
+++ b/include/exec/exec-all.h
@@ -39,8 +39,6 @@ typedef ram_addr_t tb_page_addr_t;
 #define TB_PAGE_ADDR_FMT RAM_ADDR_FMT
 #endif
 
-#include "qemu/log.h"
-
 void gen_intermediate_code(CPUState *cpu, TranslationBlock *tb, int max_insns);
 void restore_state_to_opc(CPUArchState *env, TranslationBlock *tb,
                           target_ulong *data);
diff --git a/monitor/misc.c b/monitor/misc.c
index a3a6e47844..b1839cb8ee 100644
--- a/monitor/misc.c
+++ b/monitor/misc.c
@@ -41,6 +41,7 @@
 #include "disas/disas.h"
 #include "sysemu/balloon.h"
 #include "qemu/timer.h"
+#include "qemu/log.h"
 #include "sysemu/hw_accel.h"
 #include "sysemu/runstate.h"
 #include "authz/list.h"
diff --git a/plugins/api.c b/plugins/api.c
index b143b09ce9..19595460fb 100644
--- a/plugins/api.c
+++ b/plugins/api.c
@@ -36,6 +36,7 @@
 
 #include "qemu/osdep.h"
 #include "qemu/plugin.h"
+#include "qemu/log.h"
 #include "tcg/tcg.h"
 #include "exec/exec-all.h"
 #include "exec/ram_addr.h"
diff --git a/softmmu/runstate.c b/softmmu/runstate.c
index 3cb2758b33..e0d869b21a 100644
--- a/softmmu/runstate.c
+++ b/softmmu/runstate.c
@@ -42,6 +42,7 @@
 #include "qapi/qapi-events-run-state.h"
 #include "qemu-common.h"
 #include "qemu/error-report.h"
+#include "qemu/log.h"
 #include "qemu/job.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
diff --git a/target/alpha/helper.c b/target/alpha/helper.c
index b7e7f73b15..dcaa2d03ad 100644
--- a/target/alpha/helper.c
+++ b/target/alpha/helper.c
@@ -18,7 +18,7 @@
  */
 
 #include "qemu/osdep.h"
-
+#include "qemu/log.h"
 #include "cpu.h"
 #include "exec/exec-all.h"
 #include "fpu/softfloat-types.h"
diff --git a/target/arm/helper.c b/target/arm/helper.c
index e39faa2a98..883ea3a4e1 100644
--- a/target/arm/helper.c
+++ b/target/arm/helper.c
@@ -8,6 +8,7 @@
 
 #include "qemu/osdep.h"
 #include "qemu/units.h"
+#include "qemu/log.h"
 #include "target/arm/idau.h"
 #include "trace.h"
 #include "cpu.h"
diff --git a/target/arm/m_helper.c b/target/arm/m_helper.c
index b11e927df1..648a3b3fc1 100644
--- a/target/arm/m_helper.c
+++ b/target/arm/m_helper.c
@@ -19,6 +19,7 @@
 #include "qemu/bitops.h"
 #include "qemu/crc32c.h"
 #include "qemu/qemu-print.h"
+#include "qemu/log.h"
 #include "exec/exec-all.h"
 #include <zlib.h> /* For crc32 */
 #include "semihosting/semihost.h"
diff --git a/target/arm/mte_helper.c b/target/arm/mte_helper.c
index e09b7e46a2..d11a8c70d0 100644
--- a/target/arm/mte_helper.c
+++ b/target/arm/mte_helper.c
@@ -18,6 +18,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/log.h"
 #include "cpu.h"
 #include "internals.h"
 #include "exec/exec-all.h"
diff --git a/target/avr/helper.c b/target/avr/helper.c
index 981c29da45..c27f702901 100644
--- a/target/avr/helper.c
+++ b/target/avr/helper.c
@@ -19,6 +19,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/log.h"
 #include "cpu.h"
 #include "hw/core/tcg-cpu-ops.h"
 #include "exec/exec-all.h"
diff --git a/target/cris/helper.c b/target/cris/helper.c
index a0d6ecdcd3..91e4aeb178 100644
--- a/target/cris/helper.c
+++ b/target/cris/helper.c
@@ -19,6 +19,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/log.h"
 #include "cpu.h"
 #include "hw/core/tcg-cpu-ops.h"
 #include "mmu.h"
diff --git a/target/hexagon/internal.h b/target/hexagon/internal.h
index 82ac3042ab..b1bfadc3f5 100644
--- a/target/hexagon/internal.h
+++ b/target/hexagon/internal.h
@@ -18,6 +18,8 @@
 #ifndef HEXAGON_INTERNAL_H
 #define HEXAGON_INTERNAL_H
 
+#include "qemu/log.h"
+
 /*
  * Change HEX_DEBUG to 1 to turn on debugging output
  */
diff --git a/target/hppa/helper.c b/target/hppa/helper.c
index 1ccff5765a..e2758d8df3 100644
--- a/target/hppa/helper.c
+++ b/target/hppa/helper.c
@@ -18,7 +18,7 @@
  */
 
 #include "qemu/osdep.h"
-
+#include "qemu/log.h"
 #include "cpu.h"
 #include "fpu/softfloat.h"
 #include "exec/exec-all.h"
diff --git a/target/hppa/mem_helper.c b/target/hppa/mem_helper.c
index bf07445cd1..5046cc8f9d 100644
--- a/target/hppa/mem_helper.c
+++ b/target/hppa/mem_helper.c
@@ -18,6 +18,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/log.h"
 #include "cpu.h"
 #include "exec/exec-all.h"
 #include "exec/helper-proto.h"
diff --git a/target/hppa/op_helper.c b/target/hppa/op_helper.c
index b0dec4ebf4..2810361be0 100644
--- a/target/hppa/op_helper.c
+++ b/target/hppa/op_helper.c
@@ -18,6 +18,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/log.h"
 #include "cpu.h"
 #include "exec/exec-all.h"
 #include "exec/helper-proto.h"
diff --git a/target/i386/helper.c b/target/i386/helper.c
index 533b29cb91..0639aea11b 100644
--- a/target/i386/helper.c
+++ b/target/i386/helper.c
@@ -27,6 +27,7 @@
 #include "sysemu/hw_accel.h"
 #include "monitor/monitor.h"
 #endif
+#include "qemu/log.h"
 
 void cpu_sync_bndcs_hflags(CPUX86State *env)
 {
diff --git a/target/i386/tcg/int_helper.c b/target/i386/tcg/int_helper.c
index 87fa7280ee..599ac968b0 100644
--- a/target/i386/tcg/int_helper.c
+++ b/target/i386/tcg/int_helper.c
@@ -18,6 +18,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/log.h"
 #include "cpu.h"
 #include "exec/exec-all.h"
 #include "qemu/host-utils.h"
diff --git a/target/i386/tcg/misc_helper.c b/target/i386/tcg/misc_helper.c
index 5769db5ace..24a0eaa3d5 100644
--- a/target/i386/tcg/misc_helper.c
+++ b/target/i386/tcg/misc_helper.c
@@ -18,6 +18,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/log.h"
 #include "cpu.h"
 #include "exec/helper-proto.h"
 #include "exec/exec-all.h"
diff --git a/target/i386/tcg/sysemu/seg_helper.c b/target/i386/tcg/sysemu/seg_helper.c
index bf3444c26b..83aa229acd 100644
--- a/target/i386/tcg/sysemu/seg_helper.c
+++ b/target/i386/tcg/sysemu/seg_helper.c
@@ -19,6 +19,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/log.h"
 #include "cpu.h"
 #include "exec/helper-proto.h"
 #include "exec/cpu_ldst.h"
diff --git a/target/i386/tcg/sysemu/svm_helper.c b/target/i386/tcg/sysemu/svm_helper.c
index 6d39611eb6..2b6f450af9 100644
--- a/target/i386/tcg/sysemu/svm_helper.c
+++ b/target/i386/tcg/sysemu/svm_helper.c
@@ -18,6 +18,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/log.h"
 #include "cpu.h"
 #include "exec/helper-proto.h"
 #include "exec/exec-all.h"
diff --git a/target/m68k/op_helper.c b/target/m68k/op_helper.c
index acbd473515..8decc61240 100644
--- a/target/m68k/op_helper.c
+++ b/target/m68k/op_helper.c
@@ -17,6 +17,7 @@
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 #include "qemu/osdep.h"
+#include "qemu/log.h"
 #include "cpu.h"
 #include "exec/helper-proto.h"
 #include "exec/exec-all.h"
diff --git a/target/microblaze/cpu.c b/target/microblaze/cpu.c
index b9c888b87e..aed200dcff 100644
--- a/target/microblaze/cpu.c
+++ b/target/microblaze/cpu.c
@@ -22,6 +22,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/log.h"
 #include "qapi/error.h"
 #include "cpu.h"
 #include "qemu/module.h"
diff --git a/target/microblaze/mmu.c b/target/microblaze/mmu.c
index cc40f275ea..75651979a9 100644
--- a/target/microblaze/mmu.c
+++ b/target/microblaze/mmu.c
@@ -19,6 +19,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/log.h"
 #include "cpu.h"
 #include "exec/exec-all.h"
 
diff --git a/target/microblaze/op_helper.c b/target/microblaze/op_helper.c
index 58d633584d..5b745d0928 100644
--- a/target/microblaze/op_helper.c
+++ b/target/microblaze/op_helper.c
@@ -19,6 +19,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/log.h"
 #include "cpu.h"
 #include "exec/helper-proto.h"
 #include "qemu/host-utils.h"
diff --git a/target/mips/tcg/exception.c b/target/mips/tcg/exception.c
index 7b3026b105..0b21e0872b 100644
--- a/target/mips/tcg/exception.c
+++ b/target/mips/tcg/exception.c
@@ -19,6 +19,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/log.h"
 #include "cpu.h"
 #include "internal.h"
 #include "exec/helper-proto.h"
diff --git a/target/mips/tcg/sysemu/special_helper.c b/target/mips/tcg/sysemu/special_helper.c
index 2a2afb49e8..f4f8fe8afc 100644
--- a/target/mips/tcg/sysemu/special_helper.c
+++ b/target/mips/tcg/sysemu/special_helper.c
@@ -19,6 +19,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/log.h"
 #include "cpu.h"
 #include "exec/helper-proto.h"
 #include "exec/exec-all.h"
diff --git a/target/mips/tcg/translate.h b/target/mips/tcg/translate.h
index ae01515efe..9997fe2f3c 100644
--- a/target/mips/tcg/translate.h
+++ b/target/mips/tcg/translate.h
@@ -8,6 +8,7 @@
 #ifndef TARGET_MIPS_TRANSLATE_H
 #define TARGET_MIPS_TRANSLATE_H
 
+#include "qemu/log.h"
 #include "exec/translator.h"
 
 #define MIPS_DEBUG_DISAS 0
diff --git a/target/openrisc/interrupt.c b/target/openrisc/interrupt.c
index 19223e3f25..e5724f5371 100644
--- a/target/openrisc/interrupt.c
+++ b/target/openrisc/interrupt.c
@@ -18,6 +18,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/log.h"
 #include "cpu.h"
 #include "exec/exec-all.h"
 #include "exec/gdbstub.h"
diff --git a/target/openrisc/mmu.c b/target/openrisc/mmu.c
index e561ef245b..d7e1320998 100644
--- a/target/openrisc/mmu.c
+++ b/target/openrisc/mmu.c
@@ -19,6 +19,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/log.h"
 #include "cpu.h"
 #include "exec/exec-all.h"
 #include "exec/gdbstub.h"
diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c
index c107953dec..cbac63d53c 100644
--- a/target/ppc/excp_helper.c
+++ b/target/ppc/excp_helper.c
@@ -18,6 +18,7 @@
  */
 #include "qemu/osdep.h"
 #include "qemu/main-loop.h"
+#include "qemu/log.h"
 #include "cpu.h"
 #include "exec/exec-all.h"
 #include "internal.h"
diff --git a/target/ppc/misc_helper.c b/target/ppc/misc_helper.c
index 1bcefa7c84..129432be01 100644
--- a/target/ppc/misc_helper.c
+++ b/target/ppc/misc_helper.c
@@ -18,6 +18,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/log.h"
 #include "cpu.h"
 #include "exec/exec-all.h"
 #include "exec/helper-proto.h"
diff --git a/target/s390x/tcg/excp_helper.c b/target/s390x/tcg/excp_helper.c
index 4e7648f301..be6c966cfa 100644
--- a/target/s390x/tcg/excp_helper.c
+++ b/target/s390x/tcg/excp_helper.c
@@ -19,6 +19,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/log.h"
 #include "cpu.h"
 #include "s390x-internal.h"
 #include "exec/helper-proto.h"
diff --git a/target/s390x/tcg/mem_helper.c b/target/s390x/tcg/mem_helper.c
index 406578d105..b5523ef3c7 100644
--- a/target/s390x/tcg/mem_helper.c
+++ b/target/s390x/tcg/mem_helper.c
@@ -19,6 +19,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/log.h"
 #include "cpu.h"
 #include "s390x-internal.h"
 #include "tcg_s390x.h"
diff --git a/target/sparc/ldst_helper.c b/target/sparc/ldst_helper.c
index a3e1cf9b6e..ec4fae78c3 100644
--- a/target/sparc/ldst_helper.c
+++ b/target/sparc/ldst_helper.c
@@ -18,6 +18,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/log.h"
 #include "cpu.h"
 #include "tcg/tcg.h"
 #include "exec/helper-proto.h"
diff --git a/target/sparc/mmu_helper.c b/target/sparc/mmu_helper.c
index f2668389b0..346a6dfa35 100644
--- a/target/sparc/mmu_helper.c
+++ b/target/sparc/mmu_helper.c
@@ -18,6 +18,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/log.h"
 #include "cpu.h"
 #include "exec/exec-all.h"
 #include "qemu/qemu-print.h"
diff --git a/target/tricore/helper.c b/target/tricore/helper.c
index c5e997f321..1db32808e8 100644
--- a/target/tricore/helper.c
+++ b/target/tricore/helper.c
@@ -16,7 +16,7 @@
  */
 
 #include "qemu/osdep.h"
-
+#include "qemu/log.h"
 #include "cpu.h"
 #include "exec/exec-all.h"
 #include "fpu/softfloat-helpers.h"
diff --git a/target/xtensa/dbg_helper.c b/target/xtensa/dbg_helper.c
index be1f81107b..ce2a820c60 100644
--- a/target/xtensa/dbg_helper.c
+++ b/target/xtensa/dbg_helper.c
@@ -26,6 +26,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/log.h"
 #include "qemu/main-loop.h"
 #include "cpu.h"
 #include "exec/helper-proto.h"
diff --git a/target/xtensa/exc_helper.c b/target/xtensa/exc_helper.c
index 9bc7f50d35..d4823a65cd 100644
--- a/target/xtensa/exc_helper.c
+++ b/target/xtensa/exc_helper.c
@@ -26,6 +26,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/log.h"
 #include "qemu/main-loop.h"
 #include "cpu.h"
 #include "exec/helper-proto.h"
diff --git a/target/xtensa/fpu_helper.c b/target/xtensa/fpu_helper.c
index ba3c29d19d..d2a10cc797 100644
--- a/target/xtensa/fpu_helper.c
+++ b/target/xtensa/fpu_helper.c
@@ -26,6 +26,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/log.h"
 #include "qemu/main-loop.h"
 #include "cpu.h"
 #include "exec/helper-proto.h"
diff --git a/target/xtensa/helper.c b/target/xtensa/helper.c
index 29d216ec1b..e0a9caab4b 100644
--- a/target/xtensa/helper.c
+++ b/target/xtensa/helper.c
@@ -26,6 +26,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/log.h"
 #include "cpu.h"
 #include "exec/exec-all.h"
 #include "exec/gdbstub.h"
diff --git a/target/xtensa/mmu_helper.c b/target/xtensa/mmu_helper.c
index 57e319a1af..fa66e8e867 100644
--- a/target/xtensa/mmu_helper.c
+++ b/target/xtensa/mmu_helper.c
@@ -26,6 +26,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/log.h"
 #include "qemu/main-loop.h"
 #include "qemu/qemu-print.h"
 #include "qemu/units.h"
diff --git a/target/xtensa/win_helper.c b/target/xtensa/win_helper.c
index f6f96a64c3..5a1555360a 100644
--- a/target/xtensa/win_helper.c
+++ b/target/xtensa/win_helper.c
@@ -26,6 +26,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/log.h"
 #include "qemu/main-loop.h"
 #include "cpu.h"
 #include "exec/helper-proto.h"
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 33+ messages in thread

* Re: [PATCH 03/10] hw/s390x/virtio: Add missing 'cpu.h' include
  2022-02-03 19:37 ` [PATCH 03/10] hw/s390x/virtio: Add missing 'cpu.h' include Philippe Mathieu-Daudé via
@ 2022-02-04  7:50   ` Thomas Huth
  2022-02-04  7:53     ` Philippe Mathieu-Daudé via
  2022-02-04 10:53   ` Halil Pasic
  2022-02-05 23:49   ` Richard Henderson
  2 siblings, 1 reply; 33+ messages in thread
From: Thomas Huth @ 2022-02-04  7:50 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel; +Cc: Paolo Bonzini, Richard Henderson

On 03/02/2022 20.37, Philippe Mathieu-Daudé wrote:
> CPUS390XState is declared in "cpu.h".

And how is this related to your qemu/log.h refactoring / why is this patch 
needed now?

> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>   hw/s390x/s390-virtio-hcall.h | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/hw/s390x/s390-virtio-hcall.h b/hw/s390x/s390-virtio-hcall.h
> index 9800c4b351..9773ed8a21 100644
> --- a/hw/s390x/s390-virtio-hcall.h
> +++ b/hw/s390x/s390-virtio-hcall.h
> @@ -13,6 +13,7 @@
>   #define HW_S390_VIRTIO_HCALL_H
>   
>   #include "standard-headers/asm-s390/virtio-ccw.h"
> +#include "cpu.h"
>   
>   /* The only thing that we need from the old kvm_virtio.h file */
>   #define KVM_S390_VIRTIO_NOTIFY 0

Anyway:
Acked-by: Thomas Huth <thuth@redhat.com>



^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 03/10] hw/s390x/virtio: Add missing 'cpu.h' include
  2022-02-04  7:50   ` Thomas Huth
@ 2022-02-04  7:53     ` Philippe Mathieu-Daudé via
  0 siblings, 0 replies; 33+ messages in thread
From: Philippe Mathieu-Daudé via @ 2022-02-04  7:53 UTC (permalink / raw)
  To: Thomas Huth, qemu-devel; +Cc: Paolo Bonzini, Richard Henderson

On 4/2/22 08:50, Thomas Huth wrote:
> On 03/02/2022 20.37, Philippe Mathieu-Daudé wrote:
>> CPUS390XState is declared in "cpu.h".
> 
> And how is this related to your qemu/log.h refactoring / why is this 
> patch needed now?

Hmm I might have been too overzealous when splitting in 3 parts,
this belong to the 3rd part then.

>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>> ---
>>   hw/s390x/s390-virtio-hcall.h | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/hw/s390x/s390-virtio-hcall.h b/hw/s390x/s390-virtio-hcall.h
>> index 9800c4b351..9773ed8a21 100644
>> --- a/hw/s390x/s390-virtio-hcall.h
>> +++ b/hw/s390x/s390-virtio-hcall.h
>> @@ -13,6 +13,7 @@
>>   #define HW_S390_VIRTIO_HCALL_H
>>   #include "standard-headers/asm-s390/virtio-ccw.h"
>> +#include "cpu.h"
>>   /* The only thing that we need from the old kvm_virtio.h file */
>>   #define KVM_S390_VIRTIO_NOTIFY 0
> 
> Anyway:
> Acked-by: Thomas Huth <thuth@redhat.com>
> 



^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 03/10] hw/s390x/virtio: Add missing 'cpu.h' include
  2022-02-03 19:37 ` [PATCH 03/10] hw/s390x/virtio: Add missing 'cpu.h' include Philippe Mathieu-Daudé via
  2022-02-04  7:50   ` Thomas Huth
@ 2022-02-04 10:53   ` Halil Pasic
  2022-02-05 23:49   ` Richard Henderson
  2 siblings, 0 replies; 33+ messages in thread
From: Halil Pasic @ 2022-02-04 10:53 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé via
  Cc: Halil Pasic, Paolo Bonzini, Thomas Huth, Richard Henderson,
	Philippe Mathieu-Daudé

On Thu,  3 Feb 2022 20:37:56 +0100
Philippe Mathieu-Daudé via <qemu-devel@nongnu.org> wrote:

> CPUS390XState is declared in "cpu.h".
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

No objections :)

Acked-by: Halil Pasic <pasic@linux.ibm.com>


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 04/10] hw/acpi/memory_hotplug: Remove unused 'hw/acpi/pc-hotplug.h' header
  2022-02-03 19:37 ` [PATCH 04/10] hw/acpi/memory_hotplug: Remove unused 'hw/acpi/pc-hotplug.h' header Philippe Mathieu-Daudé via
@ 2022-02-04 12:11   ` Igor Mammedov
  0 siblings, 0 replies; 33+ messages in thread
From: Igor Mammedov @ 2022-02-04 12:11 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé via
  Cc: Paolo Bonzini, Thomas Huth, Richard Henderson,
	Philippe Mathieu-Daudé

On Thu,  3 Feb 2022 20:37:57 +0100
Philippe Mathieu-Daudé via <qemu-devel@nongnu.org> wrote:

> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Reviewed-by: Igor Mammedov <imammedo@redhat.com>

> ---
>  hw/acpi/memory_hotplug.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/hw/acpi/memory_hotplug.c b/hw/acpi/memory_hotplug.c
> index a581a2183b..0a7e89a13e 100644
> --- a/hw/acpi/memory_hotplug.c
> +++ b/hw/acpi/memory_hotplug.c
> @@ -1,6 +1,5 @@
>  #include "qemu/osdep.h"
>  #include "hw/acpi/memory_hotplug.h"
> -#include "hw/acpi/pc-hotplug.h"
>  #include "hw/mem/pc-dimm.h"
>  #include "hw/qdev-core.h"
>  #include "migration/vmstate.h"



^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 05/10] qtest: Add missing 'hw/qdev-core.h' include
  2022-02-03 19:37 ` [PATCH 05/10] qtest: Add missing 'hw/qdev-core.h' include Philippe Mathieu-Daudé via
@ 2022-02-04 14:56   ` Thomas Huth
  2022-02-05 23:50   ` Richard Henderson
  1 sibling, 0 replies; 33+ messages in thread
From: Thomas Huth @ 2022-02-04 14:56 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel; +Cc: Paolo Bonzini, Richard Henderson

On 03/02/2022 20.37, Philippe Mathieu-Daudé wrote:
> Add "hw/qdev-core.h" to avoid when refactoring include/:
> 
>    softmmu/qtest.c:404:9: error: use of undeclared identifier 'NamedGPIOList'
>          NamedGPIOList *ngl;
>          ^
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>   softmmu/qtest.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/softmmu/qtest.c b/softmmu/qtest.c
> index 72751e1fd8..8b7cb6aa8e 100644
> --- a/softmmu/qtest.c
> +++ b/softmmu/qtest.c
> @@ -19,6 +19,7 @@
>   #include "chardev/char-fe.h"
>   #include "exec/ioport.h"
>   #include "exec/memory.h"
> +#include "hw/qdev-core.h"
>   #include "hw/irq.h"
>   #include "qemu/accel.h"
>   #include "sysemu/cpu-timers.h"

Reviewed-by: Thomas Huth <thuth@redhat.com>



^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 06/10] exec/ramblock: Add missing includes
  2022-02-03 19:37 ` [PATCH 06/10] exec/ramblock: Add missing includes Philippe Mathieu-Daudé via
@ 2022-02-04 14:59   ` Thomas Huth
  2022-02-05 23:50   ` Richard Henderson
  1 sibling, 0 replies; 33+ messages in thread
From: Thomas Huth @ 2022-02-04 14:59 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel; +Cc: Paolo Bonzini, Richard Henderson

On 03/02/2022 20.37, Philippe Mathieu-Daudé wrote:
> Add missing includes to avoid when refactoring include/
> 
>    include/exec/ramblock.h:26:21: error: field has incomplete type 'struct rcu_head'
>      struct rcu_head rcu;
>                      ^

... and errors due to missing definition of RAMBlockNotifier.

> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>   include/exec/ramblock.h | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/include/exec/ramblock.h b/include/exec/ramblock.h
> index 664701b759..6cbedf9e0c 100644
> --- a/include/exec/ramblock.h
> +++ b/include/exec/ramblock.h
> @@ -21,6 +21,8 @@
>   
>   #ifndef CONFIG_USER_ONLY
>   #include "cpu-common.h"
> +#include "qemu/rcu.h"
> +#include "exec/ramlist.h"
>   
>   struct RAMBlock {
>       struct rcu_head rcu;

Reviewed-by: Thomas Huth <thuth@redhat.com>



^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 01/10] hw/tpm: Clean includes
  2022-02-03 19:37 ` [PATCH 01/10] hw/tpm: Clean includes Philippe Mathieu-Daudé via
@ 2022-02-04 15:03   ` Thomas Huth
  2022-02-05 23:48   ` Richard Henderson
  1 sibling, 0 replies; 33+ messages in thread
From: Thomas Huth @ 2022-02-04 15:03 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: QEMU Trivial, Paolo Bonzini, Richard Henderson, Stefan Berger

On 03/02/2022 20.37, Philippe Mathieu-Daudé wrote:
> "tpm_ppi.h" only requires to include "exec/memory.h" to get
> the MemoryRegion declaration.
> 
> tpm_ppi.c requires "hw/qdev-core.h" to use the DEVICE() macro,
> tpm_crb.c is the only source file requiring "exec/address-spaces.h".
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>   hw/tpm/tpm_crb.c | 1 +
>   hw/tpm/tpm_ppi.c | 4 ++--
>   hw/tpm/tpm_ppi.h | 4 ++--
>   3 files changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/hw/tpm/tpm_crb.c b/hw/tpm/tpm_crb.c
> index 58ebd1469c..aa9c00aad3 100644
> --- a/hw/tpm/tpm_crb.c
> +++ b/hw/tpm/tpm_crb.c
> @@ -18,6 +18,7 @@
>   
>   #include "qemu/module.h"
>   #include "qapi/error.h"
> +#include "exec/address-spaces.h"
>   #include "hw/qdev-properties.h"
>   #include "hw/pci/pci_ids.h"
>   #include "hw/acpi/tpm.h"
> diff --git a/hw/tpm/tpm_ppi.c b/hw/tpm/tpm_ppi.c
> index 274e9aa4b0..6dbb9f41e4 100644
> --- a/hw/tpm/tpm_ppi.c
> +++ b/hw/tpm/tpm_ppi.c
> @@ -14,9 +14,9 @@
>   #include "qemu/osdep.h"
>   
>   #include "qapi/error.h"
> -#include "cpu.h"
>   #include "sysemu/memory_mapping.h"
>   #include "migration/vmstate.h"
> +#include "hw/qdev-core.h"
>   #include "hw/acpi/tpm.h"
>   #include "tpm_ppi.h"
>   #include "trace.h"
> @@ -44,7 +44,7 @@ void tpm_ppi_reset(TPMPPI *tpmppi)
>       }
>   }
>   
> -void tpm_ppi_init(TPMPPI *tpmppi, struct MemoryRegion *m,
> +void tpm_ppi_init(TPMPPI *tpmppi, MemoryRegion *m,
>                     hwaddr addr, Object *obj)
>   {
>       tpmppi->buf = qemu_memalign(qemu_real_host_page_size,
> diff --git a/hw/tpm/tpm_ppi.h b/hw/tpm/tpm_ppi.h
> index 6f773c25a0..bf5d4a300f 100644
> --- a/hw/tpm/tpm_ppi.h
> +++ b/hw/tpm/tpm_ppi.h
> @@ -12,7 +12,7 @@
>   #ifndef TPM_TPM_PPI_H
>   #define TPM_TPM_PPI_H
>   
> -#include "exec/address-spaces.h"
> +#include "exec/memory.h"

I wonder whether a simple "struct MemoryRegion;" forward declaration would 
even be better to avoid nested header inclusion?

>   typedef struct TPMPPI {
>       MemoryRegion ram;
> @@ -29,7 +29,7 @@ typedef struct TPMPPI {
>    * Register the TPM PPI memory region at @addr on the given address
>    * space for the object @obj.
>    **/
> -void tpm_ppi_init(TPMPPI *tpmppi, struct MemoryRegion *m,
> +void tpm_ppi_init(TPMPPI *tpmppi, MemoryRegion *m,
>                     hwaddr addr, Object *obj);
>   
>   /**

Anyway:
Reviewed-by: Thomas Huth <thuth@redhat.com>



^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 02/10] hw/remote: Add missing include
  2022-02-03 19:37 ` [PATCH 02/10] hw/remote: Add missing include Philippe Mathieu-Daudé via
@ 2022-02-04 15:16   ` Thomas Huth
  2022-02-05 23:48   ` Richard Henderson
  1 sibling, 0 replies; 33+ messages in thread
From: Thomas Huth @ 2022-02-04 15:16 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: QEMU Trivial, Paolo Bonzini, Jagannathan Raman, Richard Henderson

On 03/02/2022 20.37, Philippe Mathieu-Daudé wrote:
> Currently "qemu/error-report.h" is implicitly included, however
> if headers in include/ get refactored, we get:
> 
>    hw/remote/proxy-memory-listener.c: In function ‘proxy_memory_listener_commit’:
>    hw/remote/proxy-memory-listener.c:183:9: error: implicit declaration of function ‘error_report’; did you mean ‘error_report_err’? [-Werror=implicit-function-declaration]
>      183 |         error_report("Number of fds is more than %d", REMOTE_MAX_FDS);
>          |         ^~~~~~~~~~~~
>          |         error_report_err
> 
> Add the missing "qemu/error-report.h" header to avoid that.
> 
> Reviewed-by: Jagannathan Raman <jag.raman@oracle.com>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>   hw/remote/proxy-memory-listener.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/hw/remote/proxy-memory-listener.c b/hw/remote/proxy-memory-listener.c
> index 882c9b4854..0e893f3189 100644
> --- a/hw/remote/proxy-memory-listener.c
> +++ b/hw/remote/proxy-memory-listener.c
> @@ -16,6 +16,7 @@
>   #include "exec/cpu-common.h"
>   #include "exec/ram_addr.h"
>   #include "qapi/error.h"
> +#include "qemu/error-report.h"
>   #include "hw/remote/mpqemu-link.h"
>   #include "hw/remote/proxy-memory-listener.h"
>   

Reviewed-by: Thomas Huth <thuth@redhat.com>



^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 07/10] core/ptimers: Remove unnecessary 'sysemu/cpus.h' include
  2022-02-03 19:38 ` [PATCH 07/10] core/ptimers: Remove unnecessary 'sysemu/cpus.h' include Philippe Mathieu-Daudé via
@ 2022-02-04 15:21   ` Thomas Huth
  2022-02-05 23:51   ` Richard Henderson
  1 sibling, 0 replies; 33+ messages in thread
From: Thomas Huth @ 2022-02-04 15:21 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: QEMU Trivial, Paolo Bonzini, Richard Henderson

On 03/02/2022 20.38, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>   hw/core/ptimer.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/hw/core/ptimer.c b/hw/core/ptimer.c
> index 6ba19fd965..eb5ba1aff7 100644
> --- a/hw/core/ptimer.c
> +++ b/hw/core/ptimer.c
> @@ -14,7 +14,6 @@
>   #include "sysemu/cpu-timers.h"
>   #include "sysemu/qtest.h"
>   #include "block/aio.h"
> -#include "sysemu/cpus.h"
>   #include "hw/clock.h"
>   
>   #define DELTA_ADJUST     1

Reviewed-by: Thomas Huth <thuth@redhat.com>



^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 08/10] target: Add missing "qemu/timer.h" include
  2022-02-03 19:38 ` [PATCH 08/10] target: Add missing "qemu/timer.h" include Philippe Mathieu-Daudé via
@ 2022-02-04 15:29   ` Thomas Huth
  2022-02-05 23:54   ` Richard Henderson
  2022-02-07  0:26   ` Alistair Francis
  2 siblings, 0 replies; 33+ messages in thread
From: Thomas Huth @ 2022-02-04 15:29 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel; +Cc: Paolo Bonzini, Richard Henderson

On 03/02/2022 20.38, Philippe Mathieu-Daudé wrote:
> cpu_get_host_ticks() and NANOSECONDS_PER_SECOND are declared
> in "qemu/timer.h".

Seems like target/hppa/cpu.c uses neither of those? ... ok, but it uses 
timer_new_ns(), so the hunk is still ok. Maybe worth to mention it here in 
the commit description.

> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>   target/arm/cpu.c      | 1 +
>   target/arm/helper.c   | 1 +
>   target/hppa/cpu.c     | 1 +
>   target/riscv/csr.c    | 1 +
>   target/sparc/helper.c | 1 +
>   5 files changed, 5 insertions(+)
> 
> diff --git a/target/arm/cpu.c b/target/arm/cpu.c
> index cdbc4cdd01..9555f6707b 100644
> --- a/target/arm/cpu.c
> +++ b/target/arm/cpu.c
> @@ -20,6 +20,7 @@
>   
>   #include "qemu/osdep.h"
>   #include "qemu/qemu-print.h"
> +#include "qemu/timer.h"
>   #include "qemu-common.h"
>   #include "target/arm/idau.h"
>   #include "qemu/module.h"
> diff --git a/target/arm/helper.c b/target/arm/helper.c
> index 6dd241fbef..e39faa2a98 100644
> --- a/target/arm/helper.c
> +++ b/target/arm/helper.c
> @@ -15,6 +15,7 @@
>   #include "exec/helper-proto.h"
>   #include "qemu/host-utils.h"
>   #include "qemu/main-loop.h"
> +#include "qemu/timer.h"
>   #include "qemu/bitops.h"
>   #include "qemu/crc32c.h"
>   #include "qemu/qemu-print.h"
> diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c
> index 37b763fca0..5f46ba801e 100644
> --- a/target/hppa/cpu.c
> +++ b/target/hppa/cpu.c
> @@ -21,6 +21,7 @@
>   #include "qemu/osdep.h"
>   #include "qapi/error.h"
>   #include "qemu/qemu-print.h"
> +#include "qemu/timer.h"
>   #include "cpu.h"
>   #include "qemu/module.h"
>   #include "exec/exec-all.h"
> diff --git a/target/riscv/csr.c b/target/riscv/csr.c
> index a4db40769b..45f04c701a 100644
> --- a/target/riscv/csr.c
> +++ b/target/riscv/csr.c
> @@ -19,6 +19,7 @@
>   
>   #include "qemu/osdep.h"
>   #include "qemu/log.h"
> +#include "qemu/timer.h"
>   #include "cpu.h"
>   #include "qemu/main-loop.h"
>   #include "exec/exec-all.h"
> diff --git a/target/sparc/helper.c b/target/sparc/helper.c
> index c7bcaa3a20..c4358bba84 100644
> --- a/target/sparc/helper.c
> +++ b/target/sparc/helper.c
> @@ -20,6 +20,7 @@
>   #include "qemu/osdep.h"
>   #include "cpu.h"
>   #include "exec/exec-all.h"
> +#include "qemu/timer.h"
>   #include "qemu/host-utils.h"
>   #include "exec/helper-proto.h"
>   

Reviewed-by: Thomas Huth <thuth@redhat.com>



^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 09/10] linux-user: Add missing "qemu/timer.h" include
  2022-02-03 19:38 ` [PATCH 09/10] linux-user: " Philippe Mathieu-Daudé via
@ 2022-02-04 15:30   ` Thomas Huth
  2022-02-05 23:54   ` Richard Henderson
  1 sibling, 0 replies; 33+ messages in thread
From: Thomas Huth @ 2022-02-04 15:30 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: QEMU Trivial, Paolo Bonzini, Richard Henderson, Laurent Vivier

On 03/02/2022 20.38, Philippe Mathieu-Daudé wrote:
> "qemu/timer.h" declares cpu_get_host_ticks().
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>   linux-user/i386/cpu_loop.c | 1 +
>   linux-user/ppc/cpu_loop.c  | 1 +
>   2 files changed, 2 insertions(+)
> 
> diff --git a/linux-user/i386/cpu_loop.c b/linux-user/i386/cpu_loop.c
> index 29dfd7cd0c..90bffc1956 100644
> --- a/linux-user/i386/cpu_loop.c
> +++ b/linux-user/i386/cpu_loop.c
> @@ -20,6 +20,7 @@
>   #include "qemu/osdep.h"
>   #include "qemu-common.h"
>   #include "qemu.h"
> +#include "qemu/timer.h"
>   #include "user-internals.h"
>   #include "cpu_loop-common.h"
>   #include "signal-common.h"
> diff --git a/linux-user/ppc/cpu_loop.c b/linux-user/ppc/cpu_loop.c
> index 46e6ffd6d3..ffe39851ed 100644
> --- a/linux-user/ppc/cpu_loop.c
> +++ b/linux-user/ppc/cpu_loop.c
> @@ -20,6 +20,7 @@
>   #include "qemu/osdep.h"
>   #include "qemu-common.h"
>   #include "qemu.h"
> +#include "qemu/timer.h"
>   #include "user-internals.h"
>   #include "cpu_loop-common.h"
>   #include "signal-common.h"

Reviewed-by: Thomas Huth <thuth@redhat.com>



^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 10/10] exec/exec-all: Move 'qemu/log.h' include in units requiring it
  2022-02-03 19:38 ` [PATCH 10/10] exec/exec-all: Move 'qemu/log.h' include in units requiring it Philippe Mathieu-Daudé via
@ 2022-02-04 15:33   ` Thomas Huth
  2022-02-05 23:57   ` Richard Henderson
  1 sibling, 0 replies; 33+ messages in thread
From: Thomas Huth @ 2022-02-04 15:33 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel; +Cc: Paolo Bonzini, Richard Henderson

On 03/02/2022 20.38, Philippe Mathieu-Daudé wrote:
> Many files use "qemu/log.h" declarations but neglect to include
> it (they inherit it via "exec/exec-all.h"). "exec/exec-all.h" is
> a core component and shouldn't be used that way. Move the
> "qemu/log.h" inclusion locally to each unit requiring it.
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---

This seems to be a good idea, thanks for cleaning this up!

Acked-by: Thomas Huth <thuth@redhat.com>



^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 01/10] hw/tpm: Clean includes
  2022-02-03 19:37 ` [PATCH 01/10] hw/tpm: Clean includes Philippe Mathieu-Daudé via
  2022-02-04 15:03   ` Thomas Huth
@ 2022-02-05 23:48   ` Richard Henderson
  1 sibling, 0 replies; 33+ messages in thread
From: Richard Henderson @ 2022-02-05 23:48 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel; +Cc: Paolo Bonzini, Thomas Huth

On 2/4/22 06:37, Philippe Mathieu-Daudé wrote:
> "tpm_ppi.h" only requires to include "exec/memory.h" to get
> the MemoryRegion declaration.
> 
> tpm_ppi.c requires "hw/qdev-core.h" to use the DEVICE() macro,
> tpm_crb.c is the only source file requiring "exec/address-spaces.h".
> 
> Signed-off-by: Philippe Mathieu-Daudé<f4bug@amsat.org>
> ---
>   hw/tpm/tpm_crb.c | 1 +
>   hw/tpm/tpm_ppi.c | 4 ++--
>   hw/tpm/tpm_ppi.h | 4 ++--
>   3 files changed, 5 insertions(+), 4 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 02/10] hw/remote: Add missing include
  2022-02-03 19:37 ` [PATCH 02/10] hw/remote: Add missing include Philippe Mathieu-Daudé via
  2022-02-04 15:16   ` Thomas Huth
@ 2022-02-05 23:48   ` Richard Henderson
  1 sibling, 0 replies; 33+ messages in thread
From: Richard Henderson @ 2022-02-05 23:48 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Paolo Bonzini, Thomas Huth, Jagannathan Raman

On 2/4/22 06:37, Philippe Mathieu-Daudé wrote:
> Currently "qemu/error-report.h" is implicitly included, however
> if headers in include/ get refactored, we get:
> 
>    hw/remote/proxy-memory-listener.c: In function ‘proxy_memory_listener_commit’:
>    hw/remote/proxy-memory-listener.c:183:9: error: implicit declaration of function ‘error_report’; did you mean ‘error_report_err’? [-Werror=implicit-function-declaration]
>      183 |         error_report("Number of fds is more than %d", REMOTE_MAX_FDS);
>          |         ^~~~~~~~~~~~
>          |         error_report_err
> 
> Add the missing "qemu/error-report.h" header to avoid that.
> 
> Reviewed-by: Jagannathan Raman<jag.raman@oracle.com>
> Signed-off-by: Philippe Mathieu-Daudé<f4bug@amsat.org>
> ---
>   hw/remote/proxy-memory-listener.c | 1 +
>   1 file changed, 1 insertion(+)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 03/10] hw/s390x/virtio: Add missing 'cpu.h' include
  2022-02-03 19:37 ` [PATCH 03/10] hw/s390x/virtio: Add missing 'cpu.h' include Philippe Mathieu-Daudé via
  2022-02-04  7:50   ` Thomas Huth
  2022-02-04 10:53   ` Halil Pasic
@ 2022-02-05 23:49   ` Richard Henderson
  2 siblings, 0 replies; 33+ messages in thread
From: Richard Henderson @ 2022-02-05 23:49 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel; +Cc: Paolo Bonzini, Thomas Huth

On 2/4/22 06:37, Philippe Mathieu-Daudé wrote:
> CPUS390XState is declared in "cpu.h".
> 
> Signed-off-by: Philippe Mathieu-Daudé<f4bug@amsat.org>
> ---
>   hw/s390x/s390-virtio-hcall.h | 1 +
>   1 file changed, 1 insertion(+)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 05/10] qtest: Add missing 'hw/qdev-core.h' include
  2022-02-03 19:37 ` [PATCH 05/10] qtest: Add missing 'hw/qdev-core.h' include Philippe Mathieu-Daudé via
  2022-02-04 14:56   ` Thomas Huth
@ 2022-02-05 23:50   ` Richard Henderson
  1 sibling, 0 replies; 33+ messages in thread
From: Richard Henderson @ 2022-02-05 23:50 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel; +Cc: Paolo Bonzini, Thomas Huth

On 2/4/22 06:37, Philippe Mathieu-Daudé wrote:
> Add "hw/qdev-core.h" to avoid when refactoring include/:
> 
>    softmmu/qtest.c:404:9: error: use of undeclared identifier 'NamedGPIOList'
>          NamedGPIOList *ngl;
>          ^
> 
> Signed-off-by: Philippe Mathieu-Daudé<f4bug@amsat.org>
> ---
>   softmmu/qtest.c | 1 +
>   1 file changed, 1 insertion(+)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 06/10] exec/ramblock: Add missing includes
  2022-02-03 19:37 ` [PATCH 06/10] exec/ramblock: Add missing includes Philippe Mathieu-Daudé via
  2022-02-04 14:59   ` Thomas Huth
@ 2022-02-05 23:50   ` Richard Henderson
  1 sibling, 0 replies; 33+ messages in thread
From: Richard Henderson @ 2022-02-05 23:50 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel; +Cc: Paolo Bonzini, Thomas Huth

On 2/4/22 06:37, Philippe Mathieu-Daudé wrote:
> Add missing includes to avoid when refactoring include/
> 
>    include/exec/ramblock.h:26:21: error: field has incomplete type 'struct rcu_head'
>      struct rcu_head rcu;
>                      ^
> 
> Signed-off-by: Philippe Mathieu-Daudé<f4bug@amsat.org>
> ---
>   include/exec/ramblock.h | 2 ++
>   1 file changed, 2 insertions(+)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 07/10] core/ptimers: Remove unnecessary 'sysemu/cpus.h' include
  2022-02-03 19:38 ` [PATCH 07/10] core/ptimers: Remove unnecessary 'sysemu/cpus.h' include Philippe Mathieu-Daudé via
  2022-02-04 15:21   ` Thomas Huth
@ 2022-02-05 23:51   ` Richard Henderson
  1 sibling, 0 replies; 33+ messages in thread
From: Richard Henderson @ 2022-02-05 23:51 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel; +Cc: Paolo Bonzini, Thomas Huth

On 2/4/22 06:38, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé<f4bug@amsat.org>
> ---
>   hw/core/ptimer.c | 1 -
>   1 file changed, 1 deletion(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 08/10] target: Add missing "qemu/timer.h" include
  2022-02-03 19:38 ` [PATCH 08/10] target: Add missing "qemu/timer.h" include Philippe Mathieu-Daudé via
  2022-02-04 15:29   ` Thomas Huth
@ 2022-02-05 23:54   ` Richard Henderson
  2022-02-07  0:26   ` Alistair Francis
  2 siblings, 0 replies; 33+ messages in thread
From: Richard Henderson @ 2022-02-05 23:54 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel; +Cc: Paolo Bonzini, Thomas Huth

On 2/4/22 06:38, Philippe Mathieu-Daudé wrote:
> cpu_get_host_ticks() and NANOSECONDS_PER_SECOND are declared
> in "qemu/timer.h".
> 
> Signed-off-by: Philippe Mathieu-Daudé<f4bug@amsat.org>
> ---
>   target/arm/cpu.c      | 1 +
>   target/arm/helper.c   | 1 +
>   target/hppa/cpu.c     | 1 +
>   target/riscv/csr.c    | 1 +
>   target/sparc/helper.c | 1 +
>   5 files changed, 5 insertions(+)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 09/10] linux-user: Add missing "qemu/timer.h" include
  2022-02-03 19:38 ` [PATCH 09/10] linux-user: " Philippe Mathieu-Daudé via
  2022-02-04 15:30   ` Thomas Huth
@ 2022-02-05 23:54   ` Richard Henderson
  1 sibling, 0 replies; 33+ messages in thread
From: Richard Henderson @ 2022-02-05 23:54 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel; +Cc: Paolo Bonzini, Thomas Huth

On 2/4/22 06:38, Philippe Mathieu-Daudé wrote:
> "qemu/timer.h" declares cpu_get_host_ticks().
> 
> Signed-off-by: Philippe Mathieu-Daudé<f4bug@amsat.org>
> ---
>   linux-user/i386/cpu_loop.c | 1 +
>   linux-user/ppc/cpu_loop.c  | 1 +
>   2 files changed, 2 insertions(+)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 10/10] exec/exec-all: Move 'qemu/log.h' include in units requiring it
  2022-02-03 19:38 ` [PATCH 10/10] exec/exec-all: Move 'qemu/log.h' include in units requiring it Philippe Mathieu-Daudé via
  2022-02-04 15:33   ` Thomas Huth
@ 2022-02-05 23:57   ` Richard Henderson
  1 sibling, 0 replies; 33+ messages in thread
From: Richard Henderson @ 2022-02-05 23:57 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel; +Cc: Paolo Bonzini, Thomas Huth

On 2/4/22 06:38, Philippe Mathieu-Daudé wrote:
> Many files use "qemu/log.h" declarations but neglect to include
> it (they inherit it via "exec/exec-all.h"). "exec/exec-all.h" is
> a core component and shouldn't be used that way. Move the
> "qemu/log.h" inclusion locally to each unit requiring it.
> 
> Signed-off-by: Philippe Mathieu-Daudé<f4bug@amsat.org>
> ---

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 08/10] target: Add missing "qemu/timer.h" include
  2022-02-03 19:38 ` [PATCH 08/10] target: Add missing "qemu/timer.h" include Philippe Mathieu-Daudé via
  2022-02-04 15:29   ` Thomas Huth
  2022-02-05 23:54   ` Richard Henderson
@ 2022-02-07  0:26   ` Alistair Francis
  2 siblings, 0 replies; 33+ messages in thread
From: Alistair Francis @ 2022-02-07  0:26 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Paolo Bonzini, Thomas Huth, Richard Henderson,
	qemu-devel@nongnu.org Developers

On Fri, Feb 4, 2022 at 6:35 AM Philippe Mathieu-Daudé via
<qemu-devel@nongnu.org> wrote:
>
> cpu_get_host_ticks() and NANOSECONDS_PER_SECOND are declared
> in "qemu/timer.h".
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

Alistair

> ---
>  target/arm/cpu.c      | 1 +
>  target/arm/helper.c   | 1 +
>  target/hppa/cpu.c     | 1 +
>  target/riscv/csr.c    | 1 +
>  target/sparc/helper.c | 1 +
>  5 files changed, 5 insertions(+)
>
> diff --git a/target/arm/cpu.c b/target/arm/cpu.c
> index cdbc4cdd01..9555f6707b 100644
> --- a/target/arm/cpu.c
> +++ b/target/arm/cpu.c
> @@ -20,6 +20,7 @@
>
>  #include "qemu/osdep.h"
>  #include "qemu/qemu-print.h"
> +#include "qemu/timer.h"
>  #include "qemu-common.h"
>  #include "target/arm/idau.h"
>  #include "qemu/module.h"
> diff --git a/target/arm/helper.c b/target/arm/helper.c
> index 6dd241fbef..e39faa2a98 100644
> --- a/target/arm/helper.c
> +++ b/target/arm/helper.c
> @@ -15,6 +15,7 @@
>  #include "exec/helper-proto.h"
>  #include "qemu/host-utils.h"
>  #include "qemu/main-loop.h"
> +#include "qemu/timer.h"
>  #include "qemu/bitops.h"
>  #include "qemu/crc32c.h"
>  #include "qemu/qemu-print.h"
> diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c
> index 37b763fca0..5f46ba801e 100644
> --- a/target/hppa/cpu.c
> +++ b/target/hppa/cpu.c
> @@ -21,6 +21,7 @@
>  #include "qemu/osdep.h"
>  #include "qapi/error.h"
>  #include "qemu/qemu-print.h"
> +#include "qemu/timer.h"
>  #include "cpu.h"
>  #include "qemu/module.h"
>  #include "exec/exec-all.h"
> diff --git a/target/riscv/csr.c b/target/riscv/csr.c
> index a4db40769b..45f04c701a 100644
> --- a/target/riscv/csr.c
> +++ b/target/riscv/csr.c
> @@ -19,6 +19,7 @@
>
>  #include "qemu/osdep.h"
>  #include "qemu/log.h"
> +#include "qemu/timer.h"
>  #include "cpu.h"
>  #include "qemu/main-loop.h"
>  #include "exec/exec-all.h"
> diff --git a/target/sparc/helper.c b/target/sparc/helper.c
> index c7bcaa3a20..c4358bba84 100644
> --- a/target/sparc/helper.c
> +++ b/target/sparc/helper.c
> @@ -20,6 +20,7 @@
>  #include "qemu/osdep.h"
>  #include "cpu.h"
>  #include "exec/exec-all.h"
> +#include "qemu/timer.h"
>  #include "qemu/host-utils.h"
>  #include "exec/helper-proto.h"
>
> --
> 2.34.1
>
>


^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2022-02-07  0:29 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-03 19:37 [PATCH 00/10] exec: Remove 'qemu/log.h' from 'exec-all.h' Philippe Mathieu-Daudé via
2022-02-03 19:37 ` [PATCH 01/10] hw/tpm: Clean includes Philippe Mathieu-Daudé via
2022-02-04 15:03   ` Thomas Huth
2022-02-05 23:48   ` Richard Henderson
2022-02-03 19:37 ` [PATCH 02/10] hw/remote: Add missing include Philippe Mathieu-Daudé via
2022-02-04 15:16   ` Thomas Huth
2022-02-05 23:48   ` Richard Henderson
2022-02-03 19:37 ` [PATCH 03/10] hw/s390x/virtio: Add missing 'cpu.h' include Philippe Mathieu-Daudé via
2022-02-04  7:50   ` Thomas Huth
2022-02-04  7:53     ` Philippe Mathieu-Daudé via
2022-02-04 10:53   ` Halil Pasic
2022-02-05 23:49   ` Richard Henderson
2022-02-03 19:37 ` [PATCH 04/10] hw/acpi/memory_hotplug: Remove unused 'hw/acpi/pc-hotplug.h' header Philippe Mathieu-Daudé via
2022-02-04 12:11   ` Igor Mammedov
2022-02-03 19:37 ` [PATCH 05/10] qtest: Add missing 'hw/qdev-core.h' include Philippe Mathieu-Daudé via
2022-02-04 14:56   ` Thomas Huth
2022-02-05 23:50   ` Richard Henderson
2022-02-03 19:37 ` [PATCH 06/10] exec/ramblock: Add missing includes Philippe Mathieu-Daudé via
2022-02-04 14:59   ` Thomas Huth
2022-02-05 23:50   ` Richard Henderson
2022-02-03 19:38 ` [PATCH 07/10] core/ptimers: Remove unnecessary 'sysemu/cpus.h' include Philippe Mathieu-Daudé via
2022-02-04 15:21   ` Thomas Huth
2022-02-05 23:51   ` Richard Henderson
2022-02-03 19:38 ` [PATCH 08/10] target: Add missing "qemu/timer.h" include Philippe Mathieu-Daudé via
2022-02-04 15:29   ` Thomas Huth
2022-02-05 23:54   ` Richard Henderson
2022-02-07  0:26   ` Alistair Francis
2022-02-03 19:38 ` [PATCH 09/10] linux-user: " Philippe Mathieu-Daudé via
2022-02-04 15:30   ` Thomas Huth
2022-02-05 23:54   ` Richard Henderson
2022-02-03 19:38 ` [PATCH 10/10] exec/exec-all: Move 'qemu/log.h' include in units requiring it Philippe Mathieu-Daudé via
2022-02-04 15:33   ` Thomas Huth
2022-02-05 23:57   ` Richard Henderson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.