From patchwork Tue Nov 3 14:29:55 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Shah X-Patchwork-Id: 37513 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 ozlabs.org (Postfix) with ESMTPS id C766DB7BD9 for ; Wed, 4 Nov 2009 01:56:03 +1100 (EST) Received: from localhost ([127.0.0.1]:54444 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N5Knh-0008I6-0N for incoming@patchwork.ozlabs.org; Tue, 03 Nov 2009 09:56:01 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N5KR6-0002wf-8M for qemu-devel@nongnu.org; Tue, 03 Nov 2009 09:32:40 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N5KR0-0002uG-E4 for qemu-devel@nongnu.org; Tue, 03 Nov 2009 09:32:39 -0500 Received: from [199.232.76.173] (port=60060 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N5KQz-0002tn-2C for qemu-devel@nongnu.org; Tue, 03 Nov 2009 09:32:33 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42824) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N5KQx-0000sK-JE for qemu-devel@nongnu.org; Tue, 03 Nov 2009 09:32:32 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nA3EWUHo024968 for ; Tue, 3 Nov 2009 09:32:30 -0500 Received: from localhost (vpn-11-19.rdu.redhat.com [10.11.11.19]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id nA3EUtj0012281; Tue, 3 Nov 2009 09:32:29 -0500 From: Amit Shah To: qemu-devel@nongnu.org Date: Tue, 3 Nov 2009 19:59:55 +0530 Message-Id: <1257258596-4556-3-git-send-email-amit.shah@redhat.com> In-Reply-To: <1257258596-4556-2-git-send-email-amit.shah@redhat.com> References: <1257258596-4556-1-git-send-email-amit.shah@redhat.com> <1257258596-4556-2-git-send-email-amit.shah@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: Amit Shah Subject: [Qemu-devel] [PATCH 2/3] char: Remove special init_reset handling 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 The initial_reset sent to chardevs doesn't do much other than setting a bool to true. Char devices are interested in the open event and that gets sent whenever the device is opened. Moreover, the reset logic breaks as and when qemu's bh scheduling changes. Signed-off-by: Amit Shah --- qemu-char.c | 9 --------- qemu-char.h | 1 - vl.c | 1 - 3 files changed, 0 insertions(+), 11 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 1f63019..d78bae3 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -128,15 +128,6 @@ void qemu_chr_reset(CharDriverState *s) } } -void qemu_chr_initial_reset(void) -{ - CharDriverState *chr; - - QTAILQ_FOREACH(chr, &chardevs, next) { - qemu_chr_reset(chr); - } -} - int qemu_chr_write(CharDriverState *s, const uint8_t *buf, int len) { return s->chr_write(s, buf, len); diff --git a/qemu-char.h b/qemu-char.h index 05fe15d..b420111 100644 --- a/qemu-char.h +++ b/qemu-char.h @@ -83,7 +83,6 @@ void qemu_chr_add_handlers(CharDriverState *s, void *opaque); int qemu_chr_ioctl(CharDriverState *s, int cmd, void *arg); void qemu_chr_reset(CharDriverState *s); -void qemu_chr_initial_reset(void); int qemu_chr_can_read(CharDriverState *s); void qemu_chr_read(CharDriverState *s, uint8_t *buf, int len); int qemu_chr_get_msgfd(CharDriverState *s); diff --git a/vl.c b/vl.c index e57f58f..5ad4e42 100644 --- a/vl.c +++ b/vl.c @@ -5750,7 +5750,6 @@ int main(int argc, char **argv, char **envp) } text_consoles_set_display(display_state); - qemu_chr_initial_reset(); for (i = 0; i < MAX_MONITOR_DEVICES; i++) { if (monitor_devices[i] && monitor_hds[i]) {