From patchwork Thu Apr 11 16:10:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 235860 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id D0B402C00A6 for ; Fri, 12 Apr 2013 04:10:06 +1000 (EST) Received: from localhost ([::1]:49202 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQK8J-00035i-HH for incoming@patchwork.ozlabs.org; Thu, 11 Apr 2013 12:13:55 -0400 Received: from eggs.gnu.org ([208.118.235.92]:44289) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQK5T-00012v-5R for qemu-devel@nongnu.org; Thu, 11 Apr 2013 12:11:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UQK5R-0003s6-9z for qemu-devel@nongnu.org; Thu, 11 Apr 2013 12:10:58 -0400 Received: from mail-bk0-x22b.google.com ([2a00:1450:4008:c01::22b]:55027) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQK5Q-0003rm-TE for qemu-devel@nongnu.org; Thu, 11 Apr 2013 12:10:57 -0400 Received: by mail-bk0-f43.google.com with SMTP id jm2so939928bkc.30 for ; Thu, 11 Apr 2013 09:10:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=fMZjekZr8s0bgWiF0u4k0rXGykaWZUs8ICPPiib9GtE=; b=HQBCu+JJdbpVQB8v3fokipSCoQZHGV+pwiW7kCMNWPLu30TaGgAwEH+gkyoCESV2C8 FF8dUBiQauNsT3gDUptIpRXFdo8XmeiV/MdoUvT+JcEJtIfDfagfLR71AcTXm/9MCqhy rVnAHRSM7s+gAzRrHWbgP2FbWf5eTw3DWKT9ijqY39f2hP5UsD8VuZ4LVjnnXmKWRXPu fChH+djvuXHuW8nMQCwB2crm1Znp3a/zcMjfv/MhFCaOerVi+l4jPgMWT+3z3OL9rMV0 hrIce5j0XzfF1m5I2yfPZfppqht9pmV2AxIzNGh8SklYQn2X9BvrqsLL/2Vvan2E03QV eajA== X-Received: by 10.205.32.208 with SMTP id sl16mr2881549bkb.27.1365696656138; Thu, 11 Apr 2013 09:10:56 -0700 (PDT) Received: from playground.lan (93-34-176-20.ip50.fastwebnet.it. [93.34.176.20]) by mx.google.com with ESMTPS id r17sm2225568bkw.21.2013.04.11.09.10.54 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 11 Apr 2013 09:10:55 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Thu, 11 Apr 2013 18:10:29 +0200 Message-Id: <1365696633-30727-9-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1365696633-30727-1-git-send-email-pbonzini@redhat.com> References: <1365696633-30727-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4008:c01::22b Cc: peter.maydell@linaro.org, mst@redhat.com Subject: [Qemu-devel] [PATCH 08/12] include: avoid useless includes of exec/ headers X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Headers in include/exec/ are for the deepest innards of QEMU, they should almost never be included directly. Signed-off-by: Paolo Bonzini --- 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 769ce77..0de3e7e 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 #include 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 #include -#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 #endif #endif +#else +#include "exec/address-spaces.h" #endif #include "exec/cputlb.h"