From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LogV8-0004Sf-0I for qemu-devel@nongnu.org; Tue, 31 Mar 2009 12:07:46 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LogV3-0004Qo-7v for qemu-devel@nongnu.org; Tue, 31 Mar 2009 12:07:45 -0400 Received: from [199.232.76.173] (port=56613 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LogV3-0004Qk-2T for qemu-devel@nongnu.org; Tue, 31 Mar 2009 12:07:41 -0400 Received: from mail-bw0-f220.google.com ([209.85.218.220]:56651) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LogV2-0003l0-Gh for qemu-devel@nongnu.org; Tue, 31 Mar 2009 12:07:40 -0400 Received: by bwz20 with SMTP id 20so2242122bwz.34 for ; Tue, 31 Mar 2009 09:07:39 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20090331112354.GA18048@amd.home.annexia.org> References: <20090316184929.GA20955@amd.home.annexia.org> <49CB7D33.70002@us.ibm.com> <20090331112354.GA18048@amd.home.annexia.org> Date: Tue, 31 Mar 2009 19:07:39 +0300 Message-ID: Subject: Re: [PATCH] Hardware watchdog patch, version 6 (was: Re: [Qemu-devel] [PATCH] Hardware watchdog patch, version 5) From: Blue Swirl Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On 3/31/09, Richard W.M. Jones wrote: > On Thu, Mar 26, 2009 at 08:03:47AM -0500, Anthony Liguori wrote: > > Richard W.M. Jones wrote: > >> -CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE > >> +OBJS+= wdt_ib700.o wdt_i6300esb.o > >> +CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE -DHAS_WATCHDOGS > > > > I don't think this is the right way to address this problem as it isn't > > likely to scale as we add additional devices. I'd suggest either > > registering the watch dogs in the pc init function or better yet, as > > part of PCI/ISA initialization. Hopefully this will all get a lot > > cleaner as Markus' device config patches get included but for now, let's > > try to at least avoid using CFLAGS to solve this. > > I wasn't sure how to do this 'correctly'. If I initialize the > watchdog in the pc_init1 code, then the initialization happens too > late, after command line processing. So no watchdogs are registered > in time for parsing the -watchdog flag. > > The patch below contains a different solution, just using '#ifdef > TARGET_I386' as a test instead of the custom -DHAS_WATCHDOGS flag. > This matches the conditional that adds the watchdog devices in > Makefile.target, so everything is good. > > Everything else that you mentioned should be fixed in this patch. > > It's also been rebased to the latest SVN, in particular the big > changes to command-line flags and documentation. + if (i > 0) exit (i == 1 ? 1 : 0); + if (!d->enabled) return; Please split these into two lines.