qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 10/12] include: avoid useless includes of exec/ headers
Date: Mon, 15 Apr 2013 15:19:31 +0200	[thread overview]
Message-ID: <1366031973-7718-11-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1366031973-7718-1-git-send-email-pbonzini@redhat.com>

Headers in include/exec/ are for the deepest innards of QEMU,
they should almost never be included directly.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 arch_init.c            | 1 -
 dump.c                 | 6 +++++-
 hw/alpha/typhoon.c     | 1 -
 hw/ide/ahci.c          | 1 -
 hw/ide/internal.h      | 1 -
 hw/net/vmxnet_tx_pkt.c | 2 +-
 hw/usb/libhw.c         | 2 +-
 kvm-stub.c             | 1 -
 translate-all.c        | 5 ++---
 9 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/arch_init.c b/arch_init.c
index fba0889..92de1bd 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -40,7 +40,6 @@
 #include "hw/audio/audio.h"
 #include "sysemu/kvm.h"
 #include "migration/migration.h"
-#include "exec/gdbstub.h"
 #include "hw/i386/smbios.h"
 #include "exec/address-spaces.h"
 #include "hw/audio/pcspk.h"
diff --git a/dump.c b/dump.c
index a25f509..b34f143 100644
--- a/dump.c
+++ b/dump.c
@@ -23,7 +23,6 @@
 #include "sysemu/memory_mapping.h"
 #include "qapi/error.h"
 #include "qmp-commands.h"
-#include "exec/gdbstub.h"
 
 static uint16_t cpu_convert_to_target16(uint16_t val, int endian)
 {
@@ -268,6 +267,11 @@ static int write_elf64_note(DumpState *s)
     return 0;
 }
 
+static inline int cpu_index(CPUState *cpu)
+{
+    return cpu->cpu_index + 1;
+}
+
 static int write_elf64_notes(DumpState *s)
 {
     CPUArchState *env;
diff --git a/hw/alpha/typhoon.c b/hw/alpha/typhoon.c
index 68420f4..1ead187 100644
--- a/hw/alpha/typhoon.c
+++ b/hw/alpha/typhoon.c
@@ -7,7 +7,6 @@
  */
 
 #include "cpu.h"
-#include "exec/exec-all.h"
 #include "hw/hw.h"
 #include "hw/devices.h"
 #include "sysemu/sysemu.h"
diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c
index d0ae8af..3405583 100644
--- a/hw/ide/ahci.c
+++ b/hw/ide/ahci.c
@@ -29,7 +29,6 @@
 
 #include "monitor/monitor.h"
 #include "sysemu/dma.h"
-#include "exec/cpu-common.h"
 #include "internal.h"
 #include <hw/ide/pci.h>
 #include <hw/ide/ahci.h>
diff --git a/hw/ide/internal.h b/hw/ide/internal.h
index 2c89b50..0efb2da 100644
--- a/hw/ide/internal.h
+++ b/hw/ide/internal.h
@@ -8,7 +8,6 @@
  */
 #include <hw/ide.h>
 #include <hw/isa/isa.h>
-#include "exec/iorange.h"
 #include "sysemu/dma.h"
 #include "sysemu/sysemu.h"
 #include "hw/block/block.h"
diff --git a/hw/net/vmxnet_tx_pkt.c b/hw/net/vmxnet_tx_pkt.c
index b1e795b..fc01e4d 100644
--- a/hw/net/vmxnet_tx_pkt.c
+++ b/hw/net/vmxnet_tx_pkt.c
@@ -15,6 +15,7 @@
  *
  */
 
+#include "hw/hw.h"
 #include "vmxnet_tx_pkt.h"
 #include "net/eth.h"
 #include "qemu-common.h"
@@ -22,7 +23,6 @@
 #include "net/checksum.h"
 #include "net/tap.h"
 #include "net/net.h"
-#include "exec/cpu-common.h"
 
 enum {
     VMXNET_TX_PKT_VHDR_FRAG = 0,
diff --git a/hw/usb/libhw.c b/hw/usb/libhw.c
index 75f022f..d2d4b51 100644
--- a/hw/usb/libhw.c
+++ b/hw/usb/libhw.c
@@ -20,7 +20,7 @@
  * THE SOFTWARE.
  */
 #include "qemu-common.h"
-#include "exec/cpu-common.h"
+#include "hw/hw.h"
 #include "hw/usb.h"
 #include "sysemu/dma.h"
 
diff --git a/kvm-stub.c b/kvm-stub.c
index 760aadc..f6137d3 100644
--- a/kvm-stub.c
+++ b/kvm-stub.c
@@ -14,7 +14,6 @@
 #include "hw/hw.h"
 #include "hw/pci/msi.h"
 #include "cpu.h"
-#include "exec/gdbstub.h"
 #include "sysemu/kvm.h"
 
 KVMState *kvm_state;
diff --git a/translate-all.c b/translate-all.c
index a98c646..08dd038 100644
--- a/translate-all.c
+++ b/translate-all.c
@@ -35,9 +35,6 @@
 #include "cpu.h"
 #include "disas/disas.h"
 #include "tcg.h"
-#include "qemu/timer.h"
-#include "exec/memory.h"
-#include "exec/address-spaces.h"
 #if defined(CONFIG_USER_ONLY)
 #include "qemu.h"
 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
@@ -55,6 +52,8 @@
 #include <libutil.h>
 #endif
 #endif
+#else
+#include "exec/address-spaces.h"
 #endif
 
 #include "exec/cputlb.h"
-- 
1.8.1.4

  parent reply	other threads:[~2013-04-15 13:21 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-15 13:19 [Qemu-devel] [PULL 00/12] directory reorganization, fixes and final part Paolo Bonzini
2013-04-15 13:19 ` [Qemu-devel] [PATCH 01/12] arm: fix location of some include files Paolo Bonzini
2013-04-15 13:19 ` [Qemu-devel] [PATCH 02/12] Add linux-headers to QEMU_INCLUDES Paolo Bonzini
2013-04-15 13:19 ` [Qemu-devel] [PATCH 03/12] Fix failure to create q35 machine Paolo Bonzini
2013-04-15 13:19 ` [Qemu-devel] [PATCH 04/12] hw: Add lost ARM core again Paolo Bonzini
2013-04-15 13:19 ` [Qemu-devel] [PATCH 05/12] acpi: move declarations from pc.h to acpi.h Paolo Bonzini
2013-04-15 13:19 ` [Qemu-devel] [PATCH 06/12] acpi.h: make it self contained Paolo Bonzini
2013-04-15 13:19 ` [Qemu-devel] [PATCH 07/12] configure: fix TPM logic Paolo Bonzini
2013-04-15 16:02   ` Laszlo Ersek
2013-04-15 16:09   ` Peter Maydell
2013-04-15 16:14     ` Paolo Bonzini
2013-04-15 16:21       ` Peter Maydell
2013-04-16  8:28   ` Markus Armbruster
2013-04-16  8:42     ` Paolo Bonzini
2013-04-15 13:19 ` [Qemu-devel] [PATCH 08/12] tpm: reorganize headers and split hardware part Paolo Bonzini
2013-04-15 16:19   ` Laszlo Ersek
2013-04-15 13:19 ` [Qemu-devel] [PATCH 09/12] sysemu: avoid proliferation of include/ subdirectories Paolo Bonzini
2013-04-15 13:19 ` Paolo Bonzini [this message]
2013-04-15 13:19 ` [Qemu-devel] [PATCH 11/12] memory: move core typedefs to qemu/typedefs.h Paolo Bonzini
2013-04-15 13:19 ` [Qemu-devel] [PATCH 12/12] exec: remove useless declarations from memory-internal.h Paolo Bonzini
2013-04-15 16:20 ` [Qemu-devel] [PULL 00/12] directory reorganization, fixes and final part Paolo Bonzini
2013-04-15 21:10 ` Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1366031973-7718-11-git-send-email-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).