From patchwork Wed Sep 9 18:06:24 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Blue Swirl X-Patchwork-Id: 33220 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by bilbo.ozlabs.org (Postfix) with ESMTPS id 757A6B6F1F for ; Thu, 10 Sep 2009 04:18:25 +1000 (EST) Received: from localhost ([127.0.0.1]:52642 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MlRkL-0003fF-FW for incoming@patchwork.ozlabs.org; Wed, 09 Sep 2009 14:18:21 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MlRZ8-00074R-Hs for qemu-devel@nongnu.org; Wed, 09 Sep 2009 14:06:46 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MlRZ7-00073x-Ie for qemu-devel@nongnu.org; Wed, 09 Sep 2009 14:06:45 -0400 Received: from [199.232.76.173] (port=53582 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MlRZ7-00073u-EN for qemu-devel@nongnu.org; Wed, 09 Sep 2009 14:06:45 -0400 Received: from ey-out-1920.google.com ([74.125.78.145]:7771) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MlRZ6-0007yB-VT for qemu-devel@nongnu.org; Wed, 09 Sep 2009 14:06:45 -0400 Received: by ey-out-1920.google.com with SMTP id 13so1381237eye.14 for ; Wed, 09 Sep 2009 11:06:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:from:date:message-id :subject:to:content-type; bh=lj9buUeUA6xYH53JP3UCkqPQwr4RTmsFlpzuaPMTtsA=; b=a0sI/Z5eg3OE1c8SJmA8cxVSIkZC/UvHAxtQUhAZrlqsPLE/0fx2MXZoQa1JZ+tOok 9z3NgS1+Y97TCahvune0ZBcGlbpqm7zBqCGEsUoID0k1Ce3JMnKFL5KmC+4kEH4dWL75 hfp5t7NIjVbzK1LvSrtMzQmyzujreJPGppNHQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=YqT3gytT/8J5Aa8sLpEcXvj7u36CYzEHEJnyoTLLZPK7Ltwe4hZLpl73AdrJoeZn3A OBIRLZQH1xvm8f1wjAmsdahiwUIjwiXYy1Zuzaui3498v8seXG8LnR4Z1eRK0EQQ8Zou ZZySxHQKoy+X59an0h6pWvMxi18BUs9AzHOJo= MIME-Version: 1.0 Received: by 10.210.2.20 with SMTP id 20mr5103996ebb.95.1252519604176; Wed, 09 Sep 2009 11:06:44 -0700 (PDT) From: Blue Swirl Date: Wed, 9 Sep 2009 21:06:24 +0300 Message-ID: To: qemu-devel X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: [Qemu-devel] [PATCH 4/5] x86: use device info for hpet X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Blue Swirl --- hw/pc.c | 12 ++++++++++++ monitor.c | 10 ---------- qemu-monitor.hx | 2 -- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index 6292001..39a0970 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -1108,6 +1108,17 @@ 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"); +} + +static const struct MonDevInfo hpet_info = { + .dev_name = "hpet", + .dev_info_cb = info_hpet, +}; + /* PC hardware initialisation */ static void pc_init1(ram_addr_t ram_size, const char *boot_device, @@ -1327,6 +1338,7 @@ static void pc_init1(ram_addr_t ram_size, if (!no_hpet) { hpet_init(isa_irq); } + monitor_register_device_info(&hpet_info, NULL); for(i = 0; i < MAX_SERIAL_PORTS; i++) { if (serial_hds[i]) { diff --git a/monitor.c b/monitor.c index 3d18885..202c457 100644 --- a/monitor.c +++ b/monitor.c @@ -315,14 +315,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], @@ -1851,8 +1843,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 54078e2..26f9cf7 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