From patchwork Sat Aug 29 14:09:48 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Blue Swirl X-Patchwork-Id: 32505 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 B4AE5B708C for ; Sun, 30 Aug 2009 00:15:59 +1000 (EST) Received: from localhost ([127.0.0.1]:49765 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MhOid-0004Li-JE for incoming@patchwork.ozlabs.org; Sat, 29 Aug 2009 10:15:51 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MhOdF-0002m2-7k for qemu-devel@nongnu.org; Sat, 29 Aug 2009 10:10:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MhOdA-0002kl-K5 for qemu-devel@nongnu.org; Sat, 29 Aug 2009 10:10:16 -0400 Received: from [199.232.76.173] (port=54719 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MhOdA-0002ke-FV for qemu-devel@nongnu.org; Sat, 29 Aug 2009 10:10:12 -0400 Received: from mail-ew0-f223.google.com ([209.85.219.223]:38514) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MhOd9-00040i-It for qemu-devel@nongnu.org; Sat, 29 Aug 2009 10:10:12 -0400 Received: by ewy23 with SMTP id 23so3204099ewy.8 for ; Sat, 29 Aug 2009 07:10:08 -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=nk4ngXsnyOVUuSoTaolkmgNIOLqtofI+mWOMt86Rq44=; b=nXiag30Xs8RWk1sViSuIUMhue8p9Xsw6HzQ8GKJZRdBGkF224EZe4jy52fIpVbFzt1 BPGFAhvkWHXRDFQwDSWXEBuLKNy66/vvenxvEZapoS1HPqB3ez6s1Hy149R6VrqC0X3n tl7cKITNd1puw1b+/rYRZLehcI2mv3rtaWaiw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=mqKOM4LhRWXYHJQ8N0IwuvhgWOAV4w0LHCieijTQBOP7fLSI++yw7RhnoPXje5N6+3 pDKRkEoHtBMzsSAm2Gcrh3f5/WfsRXGhfnIqiJv7o+59ECHhvSoNMkOJLij4Taz7Jtzb jtzVWLcNrucDxXY/GzuxElCF8FVM1HcWGIcI0= MIME-Version: 1.0 Received: by 10.210.7.23 with SMTP id 23mr2737009ebg.27.1251555008218; Sat, 29 Aug 2009 07:10:08 -0700 (PDT) From: Blue Swirl Date: Sat, 29 Aug 2009 17:09:48 +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, RFC 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 | 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