exec: Remove 'qemu/log.h' from 'exec-all.h'
cover exec: Remove 'qemu/log.h' from 'exec-all.h'
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: <[email protected]> "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(-)
Signature · 1 line
2.34.1
PATCH 1/10 hw/tpm: Clean includes
"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".
--- 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(-)
hw/tpm/tpm_crb.c +1 -0
@@ -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"
hw/tpm/tpm_ppi.c +2 -2
@@ -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,
hw/tpm/tpm_ppi.h +2 -2
@@ -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);/**
Signature · 1 line
2.34.1
Re: [PATCH 01/10] hw/tpm: Clean includes
Quoted 54 lines · Philippe Mathieu-Daudé
"
tpm_ppi.h" only requires to include "exec/memory.h" to get the MemoryRegion declaration.
tpm_ppi.crequires "hw/qdev-core.h" to use theDEVICE()macro,tpm_crb.cis the only source file requiring "exec/address-spaces.h".Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- 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(-)hw/tpm/tpm_crb.c +1
-0@@ -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" hw/tpm/tpm_ppi.c +2
-2@@ -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,hw/tpm/tpm_ppi.h +0
-0
hw/tpm/tpm_ppi.h line 15
Quoted 5 lines
hw/tpm/tpm_ppi.h +1
-1@@ -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?
hw/tpm/tpm_ppi.h typedef struct TPMPPI { · line 35
Quoted 11 lines
hw/tpm/tpm_ppi.h +1
-1typedef 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:
Re: [PATCH 01/10] hw/tpm: Clean includes
In reply to Philippe Mathieu-Daudé viaQuoted 6 lines · Philippe Mathieu-Daudé
"
tpm_ppi.h" only requires to include "exec/memory.h" to get the MemoryRegion declaration.
tpm_ppi.crequires "hw/qdev-core.h" to use theDEVICE()macro,tpm_crb.cis the only source file requiring "exec/address-spaces.h".
Quoted 6 lines
Signed-off-by Philippe Mathieu-Daudé<[email protected]>--- 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(-)
r~
PATCH 2/10 hw/remote: Add missing include
In reply to Philippe Mathieu-Daudé viaCurrently "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_errAdd the missing "qemu/error-report.h" header to avoid that.
--- hw/remote/proxy-memory-listener.c | 1 + 1 file changed, 1 insertion(+)
hw/remote/proxy-memory-listener.c +1 -0
@@ -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"
Signature · 1 line
2.34.1
Re: [PATCH 02/10] hw/remote: Add missing include
Quoted 22 lines · Philippe Mathieu-Daudé
Currently "
qemu/error-report.h" is implicitly included, however if headers ininclude/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_errAdd the missing "
qemu/error-report.h" header to avoid that.Reviewed-by Jagannathan Raman <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/remote/proxy-memory-listener.c | 1 + 1 file changed, 1 insertion(+)hw/remote/proxy-memory-listener.c +0
-0
hw/remote/proxy-memory-listener.c line 22
Quoted 7 lines
hw/remote/proxy-memory-listener.c +1
-0@@ -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"
Re: [PATCH 02/10] hw/remote: Add missing include
In reply to Philippe Mathieu-Daudé viaQuoted 9 lines · Philippe Mathieu-Daudé
Currently "
qemu/error-report.h" is implicitly included, however if headers ininclude/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
Quoted 7 lines
Add the missing "
qemu/error-report.h" header to avoid that.Reviewed-by Jagannathan Raman<[email protected]>Signed-off-by Philippe Mathieu-Daudé<[email protected]>--- hw/remote/proxy-memory-listener.c | 1 + 1 file changed, 1 insertion(+)
r~
PATCH 3/10 hw/s390x/virtio: Add missing 'cpu.h' include
In reply to Philippe Mathieu-Daudé viaCPUS390XState is declared in "cpu.h".
--- hw/s390x/s390-virtio-hcall.h | 1 + 1 file changed, 1 insertion(+)
hw/s390x/s390-virtio-hcall.h +1 -0
@@ -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
Signature · 1 line
2.34.1
Re: [PATCH 03/10] hw/s390x/virtio: Add missing 'cpu.h' include
Quoted 1 line · Philippe Mathieu-Daudé
CPUS390XState is declared in "
cpu.h".
And how is this related to your qemu/log.h refactoring / why is this patch needed now?
Quoted 10 lines
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/s390x/s390-virtio-hcall.h | 1 + 1 file changed, 1 insertion(+)hw/s390x/s390-virtio-hcall.h +0
-0
hw/s390x/s390-virtio-hcall.h line 19
Quoted 7 lines
hw/s390x/s390-virtio-hcall.h +1
-0@@ -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:
Re: [PATCH 03/10] hw/s390x/virtio: Add missing 'cpu.h' include
Quoted 4 lines · Thomas Huth
Quoted 1 line · Philippe Mathieu-Daudé
CPUS390XState is declared in "
cpu.h".And how is this related to your
qemu/log.hrefactoring / 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.
Quoted 19 lines
Quoted 10 lines
Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
hw/s390x/s390-virtio-hcall.h| 1 +1 file changed, 1 insertion(+)hw/s390x/s390-virtio-hcall.h +0
-0hw/s390x/s390-virtio-hcall.h line 17
Quoted 5 lines
hw/s390x/s390-virtio-hcall.h +1
-0@@ -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 0Anyway:
Acked-by Thomas Huth <[email protected]>
Re: [PATCH 03/10] hw/s390x/virtio: Add missing 'cpu.h' include
In reply to Philippe Mathieu-Daudé viaQuoted 3 lines · On Thu, 3 Feb 2022 20:37:56 +0100 Philippe Mathieu-Daudé via…
CPUS390XState is declared in "
cpu.h".Signed-off-by Philippe Mathieu-Daudé <[email protected]>
No objections :)
Re: [PATCH 03/10] hw/s390x/virtio: Add missing 'cpu.h' include
In reply to Philippe Mathieu-Daudé viaQuoted 6 lines · Philippe Mathieu-Daudé
CPUS390XState is declared in "
cpu.h".Signed-off-by Philippe Mathieu-Daudé<[email protected]>--- hw/s390x/s390-virtio-hcall.h | 1 + 1 file changed, 1 insertion(+)
r~
PATCH 4/10 hw/acpi/memory_hotplug: Remove unused 'hw/acpi/pc-hotplug.h' header
In reply to Philippe Mathieu-Daudé via--- hw/acpi/memory_hotplug.c | 1 - 1 file changed, 1 deletion(-)
hw/acpi/memory_hotplug.c +0 -1
@@ -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"
Signature · 1 line
2.34.1
Re: [PATCH 04/10] hw/acpi/memory_hotplug: Remove unused 'hw/acpi/pc-hotplug.h' header
Quoted 2 lines · On Thu, 3 Feb 2022 20:37:57 +0100 Philippe Mathieu-Daudé via…
Reviewed-by Richard Henderson <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>
Quoted 15 lines
--- hw/acpi/memory_hotplug.c | 1 - 1 file changed, 1 deletion(-)hw/acpi/memory_hotplug.c +0
-1@@ -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"
PATCH 5/10 qtest: Add missing 'hw/qdev-core.h' include
In reply to Philippe Mathieu-Daudé viaAdd "hw/qdev-core.h" to avoid when refactoring include/:
softmmu/qtest.c:404:9: error: use of undeclared identifier 'NamedGPIOList'
NamedGPIOList *ngl;
^--- softmmu/qtest.c | 1 + 1 file changed, 1 insertion(+)
softmmu/qtest.c +1 -0
@@ -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"
Signature · 1 line
2.34.1
Re: [PATCH 05/10] qtest: Add missing 'hw/qdev-core.h' include
Quoted 16 lines · Philippe Mathieu-Daudé
Add "
hw/qdev-core.h" to avoid when refactoringinclude/:softmmu/qtest.c:404:9: error: use of undeclared identifier 'NamedGPIOList' NamedGPIOList *ngl; ^Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- softmmu/qtest.c | 1 + 1 file changed, 1 insertion(+)softmmu/qtest.c +0
-0
softmmu/qtest.c line 25
Quoted 7 lines
softmmu/qtest.c +1
-0@@ -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"
Re: [PATCH 05/10] qtest: Add missing 'hw/qdev-core.h' include
In reply to Philippe Mathieu-Daudé viaQuoted 10 lines · Philippe Mathieu-Daudé
Add "
hw/qdev-core.h" to avoid when refactoringinclude/:softmmu/qtest.c:404:9: error: use of undeclared identifier 'NamedGPIOList' NamedGPIOList *ngl; ^Signed-off-by Philippe Mathieu-Daudé<[email protected]>--- softmmu/qtest.c | 1 + 1 file changed, 1 insertion(+)
r~
PATCH 6/10 exec/ramblock: Add missing includes
In reply to Philippe Mathieu-Daudé viaAdd 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;
^--- include/exec/ramblock.h | 2 ++ 1 file changed, 2 insertions(+)
include/exec/ramblock.h +2 -0
@@ -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;
Signature · 1 line
2.34.1
Re: [PATCH 06/10] exec/ramblock: Add missing includes
Quoted 5 lines · 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; ^
... and errors due to missing definition of RAMBlockNotifier.
Quoted 10 lines
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- include/exec/ramblock.h | 2 ++ 1 file changed, 2 insertions(+)include/exec/ramblock.h +0
-0
include/exec/ramblock.h line 28
Quoted 8 lines
include/exec/ramblock.h +2
-0@@ -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;
Re: [PATCH 06/10] exec/ramblock: Add missing includes
In reply to Philippe Mathieu-Daudé viaQuoted 10 lines · 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é<[email protected]>--- include/exec/ramblock.h | 2 ++ 1 file changed, 2 insertions(+)
r~
PATCH 7/10 core/ptimers: Remove unnecessary 'sysemu/cpus.h' include
In reply to Philippe Mathieu-Daudé via--- hw/core/ptimer.c | 1 - 1 file changed, 1 deletion(-)
hw/core/ptimer.c +0 -1
@@ -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
Signature · 1 line
2.34.1
Re: [PATCH 07/10] core/ptimers: Remove unnecessary 'sysemu/cpus.h' include
Quoted 10 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/core/ptimer.c | 1 - 1 file changed, 1 deletion(-)hw/core/ptimer.c +0
-0
hw/core/ptimer.c line 19
Quoted 7 lines
hw/core/ptimer.c +0
-1@@ -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
Re: [PATCH 07/10] core/ptimers: Remove unnecessary 'sysemu/cpus.h' include
In reply to Philippe Mathieu-Daudé viaQuoted 4 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé<[email protected]>--- hw/core/ptimer.c | 1 - 1 file changed, 1 deletion(-)
r~
PATCH 8/10 target: Add missing "qemu/timer.h" include
In reply to Philippe Mathieu-Daudé viacpu_get_host_ticks() and NANOSECONDS_PER_SECOND are declared in "qemu/timer.h".
--- 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(+)
target/arm/cpu.c +1 -0
@@ -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"
target/arm/helper.c +1 -0
@@ -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"
target/hppa/cpu.c +1 -0
@@ -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"
target/riscv/csr.c +1 -0
@@ -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"
target/sparc/helper.c +1 -0
@@ -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"
Signature · 1 line
2.34.1
Re: [PATCH 08/10] target: Add missing "qemu/timer.h" include
Quoted 2 lines · Philippe Mathieu-Daudé
cpu_get_host_ticks()andNANOSECONDS_PER_SECONDare 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.
Quoted 62 lines
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- 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(+)target/arm/cpu.c +1
-0@@ -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" target/arm/helper.c +1
-0@@ -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" target/hppa/cpu.c +1
-0@@ -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" target/riscv/csr.c +1
-0@@ -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" target/sparc/helper.c +0
-0
target/sparc/helper.c line 26
Quoted 7 lines
target/sparc/helper.c +1
-0@@ -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"
Re: [PATCH 08/10] target: Add missing "qemu/timer.h" include
In reply to Philippe Mathieu-Daudé viaQuoted 11 lines · Philippe Mathieu-Daudé
cpu_get_host_ticks()andNANOSECONDS_PER_SECONDare declared in "qemu/timer.h".Signed-off-by Philippe Mathieu-Daudé<[email protected]>--- 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(+)
r~
Re: [PATCH 08/10] target: Add missing "qemu/timer.h" include
In reply to Philippe Mathieu-Daudé viaQuoted 5 lines · Philippe Mathieu-Daudé via
cpu_get_host_ticks()andNANOSECONDS_PER_SECONDare declared in "qemu/timer.h".Signed-off-by Philippe Mathieu-Daudé <[email protected]>
Alistair
Quoted 72 lines
--- 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(+)target/arm/cpu.c +1
-0@@ -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" target/arm/helper.c +1
-0@@ -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" target/hppa/cpu.c +1
-0@@ -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" target/riscv/csr.c +1
-0@@ -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" target/sparc/helper.c +1
-1@@ -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
PATCH 9/10 linux-user: Add missing "qemu/timer.h" include
In reply to Philippe Mathieu-Daudé via"qemu/timer.h" declares cpu_get_host_ticks().
--- linux-user/i386/cpu_loop.c | 1 + linux-user/ppc/cpu_loop.c | 1 + 2 files changed, 2 insertions(+)
linux-user/i386/cpu_loop.c +1 -0
@@ -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"
linux-user/ppc/cpu_loop.c +1 -0
@@ -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"
Signature · 1 line
2.34.1
Re: [PATCH 09/10] linux-user: Add missing "qemu/timer.h" include
Quoted 25 lines · Philippe Mathieu-Daudé
"
qemu/timer.h" declarescpu_get_host_ticks().Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- linux-user/i386/cpu_loop.c | 1 + linux-user/ppc/cpu_loop.c | 1 + 2 files changed, 2 insertions(+)linux-user/i386/cpu_loop.c +1
-0@@ -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" linux-user/ppc/cpu_loop.c +0
-0
linux-user/ppc/cpu_loop.c line 26
Quoted 7 lines
linux-user/ppc/cpu_loop.c +1
-0@@ -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"
Re: [PATCH 09/10] linux-user: Add missing "qemu/timer.h" include
In reply to Philippe Mathieu-Daudé viaQuoted 7 lines · Philippe Mathieu-Daudé
"
qemu/timer.h" declarescpu_get_host_ticks().Signed-off-by Philippe Mathieu-Daudé<[email protected]>--- linux-user/i386/cpu_loop.c | 1 + linux-user/ppc/cpu_loop.c | 1 + 2 files changed, 2 insertions(+)
r~
PATCH 10/10 exec/exec-all: Move 'qemu/log.h' include in units requiring it
In reply to Philippe Mathieu-Daudé viaMany 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.
--- 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(-)
bsd-user/signal.c +1 -0
@@ -19,6 +19,7 @@*/ #include "qemu/osdep.h" +#include "qemu/log.h" #include "qemu.h" #include "signal-common.h" #include "trace.h"
hw/arm/omap1.c +1 -0
@@ -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"
hw/display/omap_dss.c +1 -0
@@ -19,6 +19,7 @@*/ #include "qemu/osdep.h" +#include "qemu/log.h" #include "hw/hw.h" #include "hw/irq.h" #include "ui/console.h"
hw/gpio/omap_gpio.c +1 -0
@@ -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"
hw/input/tsc210x.c +1 -0
@@ -20,6 +20,7 @@*/ #include "qemu/osdep.h" +#include "qemu/log.h" #include "hw/hw.h" #include "audio/audio.h" #include "qemu/timer.h"
include/exec/exec-all.h +0 -2
@@ -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);
monitor/misc.c +1 -0
@@ -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"
plugins/api.c +1 -0
@@ -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"
softmmu/runstate.c +1 -0
@@ -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"
target/alpha/helper.c +1 -1
@@ -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"
target/arm/helper.c +1 -0
@@ -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"
target/arm/m_helper.c +1 -0
@@ -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"
target/arm/mte_helper.c +1 -0
@@ -18,6 +18,7 @@*/ #include "qemu/osdep.h" +#include "qemu/log.h" #include "cpu.h" #include "internals.h" #include "exec/exec-all.h"
target/avr/helper.c +1 -0
@@ -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"
target/cris/helper.c +1 -0
@@ -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"
target/hexagon/internal.h +2 -0
@@ -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 */
target/hppa/helper.c +1 -1
@@ -18,7 +18,7 @@*/ #include "qemu/osdep.h" - +#include "qemu/log.h" #include "cpu.h" #include "fpu/softfloat.h" #include "exec/exec-all.h"
target/hppa/mem_helper.c +1 -0
@@ -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"
target/hppa/op_helper.c +1 -0
@@ -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"
target/i386/helper.c +1 -0
@@ -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) {
target/i386/tcg/int_helper.c +1 -0
@@ -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"
target/i386/tcg/misc_helper.c +1 -0
@@ -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"
target/i386/tcg/sysemu/seg_helper.c +1 -0
@@ -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"
target/i386/tcg/sysemu/svm_helper.c +1 -0
@@ -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"
target/m68k/op_helper.c +1 -0
@@ -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"
target/microblaze/cpu.c +1 -0
@@ -22,6 +22,7 @@*/ #include "qemu/osdep.h" +#include "qemu/log.h" #include "qapi/error.h" #include "cpu.h" #include "qemu/module.h"
target/microblaze/mmu.c +1 -0
@@ -19,6 +19,7 @@*/ #include "qemu/osdep.h" +#include "qemu/log.h" #include "cpu.h" #include "exec/exec-all.h"
target/microblaze/op_helper.c +1 -0
@@ -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"
target/mips/tcg/exception.c +1 -0
@@ -19,6 +19,7 @@*/ #include "qemu/osdep.h" +#include "qemu/log.h" #include "cpu.h" #include "internal.h" #include "exec/helper-proto.h"
target/mips/tcg/sysemu/special_helper.c +1 -0
@@ -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"
target/mips/tcg/translate.h +1 -0
@@ -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
target/openrisc/interrupt.c +1 -0
@@ -18,6 +18,7 @@*/ #include "qemu/osdep.h" +#include "qemu/log.h" #include "cpu.h" #include "exec/exec-all.h" #include "exec/gdbstub.h"
target/openrisc/mmu.c +1 -0
@@ -19,6 +19,7 @@*/ #include "qemu/osdep.h" +#include "qemu/log.h" #include "cpu.h" #include "exec/exec-all.h" #include "exec/gdbstub.h"
target/ppc/excp_helper.c +1 -0
@@ -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"
target/ppc/misc_helper.c +1 -0
@@ -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"
target/s390x/tcg/excp_helper.c +1 -0
@@ -19,6 +19,7 @@*/ #include "qemu/osdep.h" +#include "qemu/log.h" #include "cpu.h" #include "s390x-internal.h" #include "exec/helper-proto.h"
target/s390x/tcg/mem_helper.c +1 -0
@@ -19,6 +19,7 @@*/ #include "qemu/osdep.h" +#include "qemu/log.h" #include "cpu.h" #include "s390x-internal.h" #include "tcg_s390x.h"
target/sparc/ldst_helper.c +1 -0
@@ -18,6 +18,7 @@*/ #include "qemu/osdep.h" +#include "qemu/log.h" #include "cpu.h" #include "tcg/tcg.h" #include "exec/helper-proto.h"
target/sparc/mmu_helper.c +1 -0
@@ -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"
target/tricore/helper.c +1 -1
@@ -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"
target/xtensa/dbg_helper.c +1 -0
@@ -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"
target/xtensa/exc_helper.c +1 -0
@@ -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"
target/xtensa/fpu_helper.c +1 -0
@@ -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"
target/xtensa/helper.c +1 -0
@@ -26,6 +26,7 @@*/ #include "qemu/osdep.h" +#include "qemu/log.h" #include "cpu.h" #include "exec/exec-all.h" #include "exec/gdbstub.h"
target/xtensa/mmu_helper.c +1 -0
@@ -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"
target/xtensa/win_helper.c +1 -0
@@ -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"
Signature · 1 line
2.34.1
Re: [PATCH 10/10] exec/exec-all: Move 'qemu/log.h' include in units requiring it
Quoted 7 lines · 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é <[email protected]>---
This seems to be a good idea, thanks for cleaning this up!
Re: [PATCH 10/10] exec/exec-all: Move 'qemu/log.h' include in units requiring it
In reply to Philippe Mathieu-Daudé viaQuoted 7 lines · 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é<[email protected]>---
r~