|
|
9ae3a8 |
From b166f0998eba97144034f39382e2e90339f4c5b1 Mon Sep 17 00:00:00 2001
|
|
|
9ae3a8 |
Message-Id: <b166f0998eba97144034f39382e2e90339f4c5b1.1387298827.git.minovotn@redhat.com>
|
|
|
9ae3a8 |
In-Reply-To: <3ed0fb61a3dc912ef036d7ef450bed192090709e.1387298827.git.minovotn@redhat.com>
|
|
|
9ae3a8 |
References: <3ed0fb61a3dc912ef036d7ef450bed192090709e.1387298827.git.minovotn@redhat.com>
|
|
|
9ae3a8 |
From: "Michael S. Tsirkin" <mst@redhat.com>
|
|
|
9ae3a8 |
Date: Tue, 17 Dec 2013 15:18:59 +0100
|
|
|
9ae3a8 |
Subject: [PATCH 45/56] hpet: fix build with CONFIG_HPET off
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
RH-Author: Michael S. Tsirkin <mst@redhat.com>
|
|
|
9ae3a8 |
Message-id: <1387293161-4085-46-git-send-email-mst@redhat.com>
|
|
|
9ae3a8 |
Patchwork-id: 56351
|
|
|
9ae3a8 |
O-Subject: [PATCH qemu-kvm RHEL7.0 v2 45/57] hpet: fix build with CONFIG_HPET off
|
|
|
9ae3a8 |
Bugzilla: 1034876
|
|
|
9ae3a8 |
RH-Acked-by: Igor Mammedov <imammedo@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Marcel Apfelbaum <marcel.a@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Orit Wasserman <owasserm@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
make hpet_find inline so we don't need
|
|
|
9ae3a8 |
to build hpet.c to check if hpet is enabled.
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Fixes link error with CONFIG_HPET off.
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Cc: qemu-stable@nongnu.org
|
|
|
9ae3a8 |
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Upstream status: posted
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
include/hw/timer/hpet.h | 10 +++++++++-
|
|
|
9ae3a8 |
hw/timer/hpet.c | 5 -----
|
|
|
9ae3a8 |
2 files changed, 9 insertions(+), 6 deletions(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Michal Novotny <minovotn@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
hw/timer/hpet.c | 5 -----
|
|
|
9ae3a8 |
include/hw/timer/hpet.h | 10 +++++++++-
|
|
|
9ae3a8 |
2 files changed, 9 insertions(+), 6 deletions(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/hw/timer/hpet.c b/hw/timer/hpet.c
|
|
|
9ae3a8 |
index 8c26851..dd486a1 100644
|
|
|
9ae3a8 |
--- a/hw/timer/hpet.c
|
|
|
9ae3a8 |
+++ b/hw/timer/hpet.c
|
|
|
9ae3a8 |
@@ -744,11 +744,6 @@ static void hpet_device_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
dc->props = hpet_device_properties;
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
-bool hpet_find(void)
|
|
|
9ae3a8 |
-{
|
|
|
9ae3a8 |
- return object_resolve_path_type("", "hpet", NULL);
|
|
|
9ae3a8 |
-}
|
|
|
9ae3a8 |
-
|
|
|
9ae3a8 |
static const TypeInfo hpet_device_info = {
|
|
|
9ae3a8 |
.name = "hpet",
|
|
|
9ae3a8 |
.parent = TYPE_SYS_BUS_DEVICE,
|
|
|
9ae3a8 |
diff --git a/include/hw/timer/hpet.h b/include/hw/timer/hpet.h
|
|
|
9ae3a8 |
index ab44bd3..773953b 100644
|
|
|
9ae3a8 |
--- a/include/hw/timer/hpet.h
|
|
|
9ae3a8 |
+++ b/include/hw/timer/hpet.h
|
|
|
9ae3a8 |
@@ -13,6 +13,8 @@
|
|
|
9ae3a8 |
#ifndef QEMU_HPET_EMUL_H
|
|
|
9ae3a8 |
#define QEMU_HPET_EMUL_H
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
+#include "qom/object.h"
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
#define HPET_BASE 0xfed00000
|
|
|
9ae3a8 |
#define HPET_CLK_PERIOD 10000000ULL /* 10000000 femtoseconds == 10ns*/
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
@@ -72,5 +74,11 @@ struct hpet_fw_config
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
extern struct hpet_fw_config hpet_cfg;
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
-bool hpet_find(void);
|
|
|
9ae3a8 |
+#define TYPE_HPET "hpet"
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+static inline bool hpet_find(void)
|
|
|
9ae3a8 |
+{
|
|
|
9ae3a8 |
+ return object_resolve_path_type("", TYPE_HPET, NULL);
|
|
|
9ae3a8 |
+}
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
#endif
|
|
|
9ae3a8 |
--
|
|
|
9ae3a8 |
1.7.11.7
|
|
|
9ae3a8 |
|