From patchwork Thu May 19 11:18:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 9127451 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 85A94BF29F for ; Thu, 19 May 2016 12:06:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A4F5D20218 for ; Thu, 19 May 2016 12:06:42 +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 B097B20211 for ; Thu, 19 May 2016 12:06:41 +0000 (UTC) Received: from localhost ([::1]:49927 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3Miu-0005Ry-Ql for patchwork-qemu-devel@patchwork.kernel.org; Thu, 19 May 2016 08:06:40 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37324) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3LzP-0004iV-5A for qemu-devel@nongnu.org; Thu, 19 May 2016 07:19:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b3LzG-0004Gb-2c for qemu-devel@nongnu.org; Thu, 19 May 2016 07:19:39 -0400 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]:35361) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3LzF-0004GS-PN for qemu-devel@nongnu.org; Thu, 19 May 2016 07:19:30 -0400 Received: by mail-wm0-x243.google.com with SMTP id s63so5553364wme.2 for ; Thu, 19 May 2016 04:19:29 -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=rLnFVEWRCXy07oolJiE6OdCBKB4+n5y++tHR2BWPSsA=; b=lOoMHHLUcTRRiP2pxXWTjGBjtMLTAeO5B9/91ufdmqQt4ivViC+rGhniPcynxaMMf3 tIMh0oN6jsap00+CFI5s6Bu97n+T6IuxHikGbT1bTYeZhqIn7f0nCngc/BxsF/pk18du FDz8cejWBYnL2JWTnFZwAmvJogiLa3DwS0VBuacS7mlMXOIDN7nf3XjLsUkKq6ndFcSZ BaAbwltDi8rMf9Eo8M8vARqJo6jcjAcDCMWd7tjJMtD2mct9Sa1z8DVCubyTjlCIyVJh fwujyB8ZvsnlifXiyInyJMBKXkLdX5XBLu9qndyz+METec/MdUmOwRf7vmqLuVREGtri KW+g== 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=rLnFVEWRCXy07oolJiE6OdCBKB4+n5y++tHR2BWPSsA=; b=eRJqOBfuvQnyviNRNHK+7bhxFhYuVtNlV4AxifBO00w05Tm2EJAb/GCVRGPQ6kpLc/ azALOrRf0udJISlCauJ5P+NC7BiDQ+9H4qWbuA1eMVxXd2KXgFrkLHc8p34NoPDpfscy tsXuQrf8ZwsRG8S9fkkw4O0JGtfrcyUGF9KFXYCL8ItonTOlln4NPDgmGsdP7U4BJZqq cnnDRP9wKzl+kQ8TJIZ/ous6wIl4DQQ2CD9HQE7914yZjKylxjMWNPncMKberhXnQDtB QgkL9NTKwBBFV4tR/j9pzy9Ay7IH40HRkh0eeyYS48D2sVVRQDkVOv0UzOsBNPLnRzC2 z4yA== X-Gm-Message-State: AOPr4FX48Z9plnqDegCza5yyX6LoNkwFpxYl0G4eiRkzZs8kx5qoRahhS45jpXL6dH12kw== X-Received: by 10.28.21.137 with SMTP id 131mr12550988wmv.65.1463656769248; Thu, 19 May 2016 04:19:29 -0700 (PDT) Received: from 640k.lan (dynamic-adsl-78-12-252-58.clienti.tiscali.it. [78.12.252.58]) by smtp.gmail.com with ESMTPSA id c7sm8374317wji.38.2016.05.19.04.19.28 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 May 2016 04:19:28 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Thu, 19 May 2016 13:18:34 +0200 Message-Id: <1463656726-35952-41-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1463656726-35952-1-git-send-email-pbonzini@redhat.com> References: <1463656726-35952-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::243 Subject: [Qemu-devel] [PULL 40/52] qemu-common: stop including qemu/host-utils.h from qemu-common.h X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 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" 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/spiceaudio.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 - page_cache.c | 1 + slirp/slirp.h | 1 + stubs/slirp.c | 1 + tests/libqos/malloc.c | 1 + util/buffer.c | 1 + 15 files changed, 18 insertions(+), 9 deletions(-) diff --git a/audio/noaudio.c b/audio/noaudio.c index b360c19..9ca9eaf 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/spiceaudio.c b/audio/spiceaudio.c index dea71d3..5580e76 100644 --- a/audio/spiceaudio.c +++ b/audio/spiceaudio.c @@ -19,6 +19,7 @@ #include "qemu/osdep.h" #include "hw/hw.h" +#include "qemu/host-utils.h" #include "qemu/error-report.h" #include "qemu/timer.h" #include "ui/qemu-spice.h" diff --git a/audio/wavaudio.c b/audio/wavaudio.c index 345952e..341eec3 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 172db78..bf4ee0b 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 6a2f452..1ffd155 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, + NANOSECONDS_PER_SECOND); +} + 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 e0978c8..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, - NANOSECONDS_PER_SECOND); -} - /* 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 dc041fc..cd3139b 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/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 e373876..5df755e 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 33e94d1..d8bb874 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"