qemu-common: stop including qemu/host-utils.h from qemu-common.h
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 <pbonzini@redhat.com>
This commit is contained in:
parent
58369e22cf
commit
87776ab72b
@ -23,6 +23,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "qemu/osdep.h"
|
#include "qemu/osdep.h"
|
||||||
#include "qemu-common.h"
|
#include "qemu-common.h"
|
||||||
|
#include "qemu/host-utils.h"
|
||||||
#include "audio.h"
|
#include "audio.h"
|
||||||
#include "qemu/timer.h"
|
#include "qemu/timer.h"
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
#include "qemu/osdep.h"
|
#include "qemu/osdep.h"
|
||||||
#include "hw/hw.h"
|
#include "hw/hw.h"
|
||||||
|
#include "qemu/host-utils.h"
|
||||||
#include "qemu/error-report.h"
|
#include "qemu/error-report.h"
|
||||||
#include "qemu/timer.h"
|
#include "qemu/timer.h"
|
||||||
#include "ui/qemu-spice.h"
|
#include "ui/qemu-spice.h"
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
* THE SOFTWARE.
|
* THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
#include "qemu/osdep.h"
|
#include "qemu/osdep.h"
|
||||||
#include "hw/hw.h"
|
#include "qemu/host-utils.h"
|
||||||
#include "qemu/timer.h"
|
#include "qemu/timer.h"
|
||||||
#include "audio.h"
|
#include "audio.h"
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "qemu/osdep.h"
|
#include "qemu/osdep.h"
|
||||||
#include "qemu-common.h"
|
#include "qemu-common.h"
|
||||||
|
#include "qemu/host-utils.h"
|
||||||
#include "qemu/sockets.h"
|
#include "qemu/sockets.h"
|
||||||
|
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
|
@ -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)
|
void acpi_pm_tmr_calc_overflow_time(ACPIREGS *ar)
|
||||||
{
|
{
|
||||||
int64_t d = acpi_pm_tmr_get_clock();
|
int64_t d = acpi_pm_tmr_get_clock();
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
#include "qemu/osdep.h"
|
#include "qemu/osdep.h"
|
||||||
#include "qemu-common.h"
|
#include "qemu-common.h"
|
||||||
|
#include "qemu/host-utils.h"
|
||||||
#include "hw/bt.h"
|
#include "hw/bt.h"
|
||||||
|
|
||||||
struct bt_l2cap_sdp_state_s {
|
struct bt_l2cap_sdp_state_s {
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "qemu/osdep.h"
|
#include "qemu/osdep.h"
|
||||||
#include "qapi/error.h"
|
#include "qapi/error.h"
|
||||||
|
#include "qemu/host-utils.h"
|
||||||
#include "hw/hw.h"
|
#include "hw/hw.h"
|
||||||
#include "hw/devices.h"
|
#include "hw/devices.h"
|
||||||
#include "hw/block/flash.h"
|
#include "hw/block/flash.h"
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#error cpu.h included from common code
|
#error cpu.h included from common code
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "qemu/host-utils.h"
|
||||||
#include "qemu/queue.h"
|
#include "qemu/queue.h"
|
||||||
#include "tcg-target.h"
|
#include "tcg-target.h"
|
||||||
#ifndef CONFIG_USER_ONLY
|
#ifndef CONFIG_USER_ONLY
|
||||||
|
@ -150,13 +150,6 @@ void acpi_pm_tmr_init(ACPIREGS *ar, acpi_update_sci_fn update_sci,
|
|||||||
MemoryRegion *parent);
|
MemoryRegion *parent);
|
||||||
void acpi_pm_tmr_reset(ACPIREGS *ar);
|
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. */
|
/* PM1a_EVT: piix and ich9 don't implement PM1b. */
|
||||||
uint16_t acpi_pm1_evt_get_sts(ACPIREGS *ar);
|
uint16_t acpi_pm1_evt_get_sts(ACPIREGS *ar);
|
||||||
void acpi_pm1_evt_power_down(ACPIREGS *ar);
|
void acpi_pm1_evt_power_down(ACPIREGS *ar);
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
#define TFR(expr) do { if ((expr) != -1) break; } while (errno == EINTR)
|
#define TFR(expr) do { if ((expr) != -1) break; } while (errno == EINTR)
|
||||||
|
|
||||||
#include "qemu/option.h"
|
#include "qemu/option.h"
|
||||||
#include "qemu/host-utils.h"
|
|
||||||
|
|
||||||
/* FIXME: Remove NEED_CPU_H. */
|
/* FIXME: Remove NEED_CPU_H. */
|
||||||
#ifdef NEED_CPU_H
|
#ifdef NEED_CPU_H
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
#include "qemu-common.h"
|
#include "qemu-common.h"
|
||||||
|
#include "qemu/host-utils.h"
|
||||||
#include "migration/page_cache.h"
|
#include "migration/page_cache.h"
|
||||||
|
|
||||||
#ifdef DEBUG_CACHE
|
#ifdef DEBUG_CACHE
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#ifndef __COMMON_H__
|
#ifndef __COMMON_H__
|
||||||
#define __COMMON_H__
|
#define __COMMON_H__
|
||||||
|
|
||||||
|
#include "qemu/host-utils.h"
|
||||||
#include "slirp_config.h"
|
#include "slirp_config.h"
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "qemu/osdep.h"
|
#include "qemu/osdep.h"
|
||||||
#include "qemu-common.h"
|
#include "qemu-common.h"
|
||||||
|
#include "qemu/host-utils.h"
|
||||||
#include "slirp/slirp.h"
|
#include "slirp/slirp.h"
|
||||||
|
|
||||||
void slirp_pollfds_fill(GArray *pollfds, uint32_t *timeout)
|
void slirp_pollfds_fill(GArray *pollfds, uint32_t *timeout)
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
#include "qemu/osdep.h"
|
#include "qemu/osdep.h"
|
||||||
#include "libqos/malloc.h"
|
#include "libqos/malloc.h"
|
||||||
#include "qemu-common.h"
|
#include "qemu-common.h"
|
||||||
|
#include "qemu/host-utils.h"
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
typedef QTAILQ_HEAD(MemList, MemBlock) MemList;
|
typedef QTAILQ_HEAD(MemList, MemBlock) MemList;
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "qemu/osdep.h"
|
#include "qemu/osdep.h"
|
||||||
|
#include "qemu/host-utils.h"
|
||||||
#include "qemu/buffer.h"
|
#include "qemu/buffer.h"
|
||||||
#include "trace.h"
|
#include "trace.h"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user