From patchwork Wed Mar 16 10:46:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 8598591 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D48329F3D1 for ; Wed, 16 Mar 2016 11:13:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F15CB202EC for ; Wed, 16 Mar 2016 11:13:25 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DC724202E6 for ; Wed, 16 Mar 2016 11:13:23 +0000 (UTC) Received: from localhost ([::1]:55179 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ag9OF-0007Ef-8D for patchwork-qemu-devel@patchwork.kernel.org; Wed, 16 Mar 2016 07:13:23 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37273) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ag8zS-0003gZ-7g for qemu-devel@nongnu.org; Wed, 16 Mar 2016 06:47:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ag8zQ-0002HI-T9 for qemu-devel@nongnu.org; Wed, 16 Mar 2016 06:47:46 -0400 Received: from mail-wm0-x233.google.com ([2a00:1450:400c:c09::233]:36168) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ag8zQ-0002H5-9q for qemu-devel@nongnu.org; Wed, 16 Mar 2016 06:47:44 -0400 Received: by mail-wm0-x233.google.com with SMTP id l124so43292622wmf.1 for ; Wed, 16 Mar 2016 03:47:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:in-reply-to:references; bh=DdPeLgZIwu+Pr5OML/ICBbx8DuECSiuuQnvj3ZjfjX8=; b=0Wez18BO+/d1QgVsz/QaBnbmVFXgYkjRKKUHD5n0H5gOdYka86igDm8LAb1vNfYHMM WnLgCQKi5qmMYzIGIbmPsZ0vfDVXD6QlgV/T4BriwLWHEbbAxt+qhneDfoXiD9dPyedR xFmgz4p4g73cX2WNqTZzJGhtGI+p9IIsj3IjLEv57eoSIIhTeYlk0053757HgtXdSEmd pnH3Ovk/nBYpLknhsnyUbSJM+inCdkEQwU/iRXrY5xwxCeHL3NrRIPAT1y8zjUyw24Lk K7biekDL+zxwtXDQtvIxhn2zYR82K1XCXjtfDq8ZF+SWGzw7MzAfUkmZygC41h53tt3a vTaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references; bh=DdPeLgZIwu+Pr5OML/ICBbx8DuECSiuuQnvj3ZjfjX8=; b=H5YclbqaihNo9e6KV/UlrbBfkFmVsR79EF1a61EKQmOE/PrCudpjUeXt3ueYilR+Mn 73rSKchc3IKPvW2mrH2flw+FDQiIpN7+mAWGC7Yvkla+LsNA2a5y0wrmtAk43HM6ihnL lctIf63IqcrvFgo2TpWFsC4HcsTQdU6nn2waiKrnPMLdJU3rGty3JSEGuVBw2m33So7j dmLxHXqM/5PSEA2r0lqVYwULu8s9MT5QmP/x6gbrMYF1Hn8WB2rp5gdD9J3hx26NgtTt 3xvjr4GEa0i+hL6mPZolsu0Xf74mtg/uw4f9nrWTJp0bnxX8viItsC3MHatlqiKu66E/ uCQQ== X-Gm-Message-State: AD7BkJIBOiZJPaU6Jz9y2bzWAWHp/dYwE2kBJE0JmDETjV9wKvzgBRot6jpbjrv5kjeGmQ== X-Received: by 10.194.63.75 with SMTP id e11mr3016836wjs.79.1458125263687; Wed, 16 Mar 2016 03:47:43 -0700 (PDT) Received: from 640k.lan (94-39-161-17.adsl-ull.clienti.tiscali.it. [94.39.161.17]) by smtp.gmail.com with ESMTPSA id wr2sm2418094wjc.49.2016.03.16.03.47.42 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Mar 2016 03:47:42 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Wed, 16 Mar 2016 11:46:48 +0100 Message-Id: <1458125219-131698-39-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1458125219-131698-1-git-send-email-pbonzini@redhat.com> References: <1458125219-131698-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::233 Subject: [Qemu-devel] [PATCH 38/49] qemu-common: stop including qemu/host-utils.h from qemu-common.h 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Move it to the actual users. There are some inclusions of qemu/host-utils.h in headers, but they are all necessary. Signed-off-by: Paolo Bonzini --- audio/noaudio.c | 1 + audio/wavaudio.c | 2 +- contrib/ivshmem-server/ivshmem-server.c | 1 + hw/acpi/core.c | 6 ++++++ hw/bt/sdp.c | 1 + hw/display/tc6393xb.c | 1 + include/exec/cpu-defs.h | 1 + include/hw/acpi/acpi.h | 7 ------- include/qemu-common.h | 1 - include/qemu/timer.h | 1 - page_cache.c | 1 + slirp/slirp.h | 1 + stubs/slirp.c | 1 + tests/libqos/malloc.c | 1 + util/buffer.c | 1 + 15 files changed, 17 insertions(+), 10 deletions(-) diff --git a/audio/noaudio.c b/audio/noaudio.c index 09588b9..fb11828 100644 --- a/audio/noaudio.c +++ b/audio/noaudio.c @@ -23,6 +23,7 @@ */ #include "qemu/osdep.h" #include "qemu-common.h" +#include "qemu/host-utils.h" #include "audio.h" #include "qemu/timer.h" diff --git a/audio/wavaudio.c b/audio/wavaudio.c index 343b1a1..2b0b688 100644 --- a/audio/wavaudio.c +++ b/audio/wavaudio.c @@ -22,7 +22,7 @@ * THE SOFTWARE. */ #include "qemu/osdep.h" -#include "hw/hw.h" +#include "qemu/host-utils.h" #include "qemu/timer.h" #include "audio.h" diff --git a/contrib/ivshmem-server/ivshmem-server.c b/contrib/ivshmem-server/ivshmem-server.c index bfd0fad..5731c20 100644 --- a/contrib/ivshmem-server/ivshmem-server.c +++ b/contrib/ivshmem-server/ivshmem-server.c @@ -7,6 +7,7 @@ */ #include "qemu/osdep.h" #include "qemu-common.h" +#include "qemu/host-utils.h" #include "qemu/sockets.h" #include diff --git a/hw/acpi/core.c b/hw/acpi/core.c index 3d9e5c4..26c8cd8 100644 --- a/hw/acpi/core.c +++ b/hw/acpi/core.c @@ -491,6 +491,12 @@ void acpi_pm_tmr_update(ACPIREGS *ar, bool enable) } } +static inline int64_t acpi_pm_tmr_get_clock(void) +{ + return muldiv64(qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL), PM_TIMER_FREQUENCY, + get_ticks_per_sec()); +} + void acpi_pm_tmr_calc_overflow_time(ACPIREGS *ar) { int64_t d = acpi_pm_tmr_get_clock(); diff --git a/hw/bt/sdp.c b/hw/bt/sdp.c index be26009..f67b3b8 100644 --- a/hw/bt/sdp.c +++ b/hw/bt/sdp.c @@ -19,6 +19,7 @@ #include "qemu/osdep.h" #include "qemu-common.h" +#include "qemu/host-utils.h" #include "hw/bt.h" struct bt_l2cap_sdp_state_s { diff --git a/hw/display/tc6393xb.c b/hw/display/tc6393xb.c index da3cece..92f7120 100644 --- a/hw/display/tc6393xb.c +++ b/hw/display/tc6393xb.c @@ -12,6 +12,7 @@ */ #include "qemu/osdep.h" #include "qapi/error.h" +#include "qemu/host-utils.h" #include "hw/hw.h" #include "hw/devices.h" #include "hw/block/flash.h" diff --git a/include/exec/cpu-defs.h b/include/exec/cpu-defs.h index 854e7e3..5f4e303 100644 --- a/include/exec/cpu-defs.h +++ b/include/exec/cpu-defs.h @@ -23,6 +23,7 @@ #error cpu.h included from common code #endif +#include "qemu/host-utils.h" #include "qemu/queue.h" #include "tcg-target.h" #ifndef CONFIG_USER_ONLY diff --git a/include/hw/acpi/acpi.h b/include/hw/acpi/acpi.h index 443687d..dc6ee00 100644 --- a/include/hw/acpi/acpi.h +++ b/include/hw/acpi/acpi.h @@ -150,13 +150,6 @@ void acpi_pm_tmr_init(ACPIREGS *ar, acpi_update_sci_fn update_sci, MemoryRegion *parent); void acpi_pm_tmr_reset(ACPIREGS *ar); -#include "qemu/timer.h" -static inline int64_t acpi_pm_tmr_get_clock(void) -{ - return muldiv64(qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL), PM_TIMER_FREQUENCY, - get_ticks_per_sec()); -} - /* PM1a_EVT: piix and ich9 don't implement PM1b. */ uint16_t acpi_pm1_evt_get_sts(ACPIREGS *ar); void acpi_pm1_evt_power_down(ACPIREGS *ar); diff --git a/include/qemu-common.h b/include/qemu-common.h index 24823be..6e2da3e 100644 --- a/include/qemu-common.h +++ b/include/qemu-common.h @@ -21,7 +21,6 @@ #define TFR(expr) do { if ((expr) != -1) break; } while (errno == EINTR) #include "qemu/option.h" -#include "qemu/host-utils.h" /* FIXME: Remove NEED_CPU_H. */ #ifdef NEED_CPU_H diff --git a/include/qemu/timer.h b/include/qemu/timer.h index c37f74d..392aa34 100644 --- a/include/qemu/timer.h +++ b/include/qemu/timer.h @@ -3,7 +3,6 @@ #include "qemu-common.h" #include "qemu/notify.h" -#include "qemu/host-utils.h" #include "sysemu/cpus.h" #define NANOSECONDS_PER_SECOND 1000000000LL diff --git a/page_cache.c b/page_cache.c index cb8a69e..37a66e4 100644 --- a/page_cache.c +++ b/page_cache.c @@ -16,6 +16,7 @@ #include #include "qemu-common.h" +#include "qemu/host-utils.h" #include "migration/page_cache.h" #ifdef DEBUG_CACHE diff --git a/slirp/slirp.h b/slirp/slirp.h index a6741e7..077a80a 100644 --- a/slirp/slirp.h +++ b/slirp/slirp.h @@ -1,6 +1,7 @@ #ifndef __COMMON_H__ #define __COMMON_H__ +#include "qemu/host-utils.h" #include "slirp_config.h" #ifdef _WIN32 diff --git a/stubs/slirp.c b/stubs/slirp.c index dcae51f..42f7e1a 100644 --- a/stubs/slirp.c +++ b/stubs/slirp.c @@ -1,5 +1,6 @@ #include "qemu/osdep.h" #include "qemu-common.h" +#include "qemu/host-utils.h" #include "slirp/slirp.h" void slirp_pollfds_fill(GArray *pollfds, uint32_t *timeout) diff --git a/tests/libqos/malloc.c b/tests/libqos/malloc.c index c0df52f..793fe69 100644 --- a/tests/libqos/malloc.c +++ b/tests/libqos/malloc.c @@ -13,6 +13,7 @@ #include "qemu/osdep.h" #include "libqos/malloc.h" #include "qemu-common.h" +#include "qemu/host-utils.h" #include typedef QTAILQ_HEAD(MemList, MemBlock) MemList; diff --git a/util/buffer.c b/util/buffer.c index a6118bf..f59bacc 100644 --- a/util/buffer.c +++ b/util/buffer.c @@ -19,6 +19,7 @@ */ #include "qemu/osdep.h" +#include "qemu/host-utils.h" #include "qemu/buffer.h" #include "trace.h"