qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Blue Swirl <blauwirbel@gmail.com>
To: qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [PATCH, RFC 4/5] x86: use device info for hpet
Date: Sat, 29 Aug 2009 17:09:48 +0300	[thread overview]
Message-ID: <f43fc5580908290709u383c2927ncf113333271f5d81@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2169 bytes --]

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
---
 hw/pc.c         |    7 +++++++
 monitor.c       |   10 ----------
 qemu-monitor.hx |    2 --
 3 files changed, 7 insertions(+), 12 deletions(-)

diff --git a/hw/pc.c b/hw/pc.c
index 32713b4..cbb9542 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -1108,6 +1108,12 @@ static CPUState *pc_new_cpu(const char *cpu_model)
     return env;
 }

+static void info_hpet(Monitor *mon, void *opaque)
+{
+    monitor_printf(mon, "HPET is %s by QEMU\n",
+                   (no_hpet) ? "disabled" : "enabled");
+}
+
 /* PC hardware initialisation */
 static void pc_init1(ram_addr_t ram_size,
                      const char *boot_device,
@@ -1328,6 +1334,7 @@ static void pc_init1(ram_addr_t ram_size,
     if (!no_hpet) {
         hpet_init(isa_irq);
     }
+    monitor_register_device_info("hpet", info_hpet, NULL);

     for(i = 0; i < MAX_SERIAL_PORTS; i++) {
         if (serial_hds[i]) {
diff --git a/monitor.c b/monitor.c
index 4f507f2..9a55e1c 100644
--- a/monitor.c
+++ b/monitor.c
@@ -304,14 +304,6 @@ static void do_info_name(Monitor *mon)
         monitor_printf(mon, "%s\n", qemu_name);
 }

-#if defined(TARGET_I386)
-static void do_info_hpet(Monitor *mon)
-{
-    monitor_printf(mon, "HPET is %s by QEMU\n",
-                   (no_hpet) ? "disabled" : "enabled");
-}
-#endif
-
 static void do_info_uuid(Monitor *mon)
 {
     monitor_printf(mon, UUID_FMT "\n", qemu_uuid[0], qemu_uuid[1],
@@ -1806,8 +1798,6 @@ static const mon_cmd_t info_cmds[] = {
 #if defined(TARGET_I386)
     { "mem", "", mem_info,
       "", "show the active virtual memory mappings", },
-    { "hpet", "", do_info_hpet,
-      "", "show state of HPET", },
 #endif
     { "jit", "", do_info_jit,
       "", "show dynamic compiler info", },
diff --git a/qemu-monitor.hx b/qemu-monitor.hx
index 6ad960e..946ba34 100644
--- a/qemu-monitor.hx
+++ b/qemu-monitor.hx
@@ -49,8 +49,6 @@ show the command line history
 show virtual to physical memory mappings (i386 only)
 @item info mem
 show the active virtual memory mappings (i386 only)
-@item info hpet
-show state of HPET (i386 only)
 @item info kvm
 show KVM information
 @item info usb
-- 
1.6.2.4

[-- Attachment #2: 0004-x86-use-device-info-for-hpet.patch --]
[-- Type: application/mbox, Size: 2370 bytes --]

                 reply	other threads:[~2009-08-29 14:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f43fc5580908290709u383c2927ncf113333271f5d81@mail.gmail.com \
    --to=blauwirbel@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).