[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Hardware watchdog patch, version 6 (was: Re: [Qemu-devel] [

From: Blue Swirl
Subject: Re: [PATCH] Hardware watchdog patch, version 6 (was: Re: [Qemu-devel] [PATCH] Hardware watchdog patch, version 5)
Date: Tue, 31 Mar 2009 19:07:39 +0300

On 3/31/09, Richard W.M. Jones <address@hidden> wrote:
> On Thu, Mar 26, 2009 at 08:03:47AM -0500, Anthony Liguori wrote:
>  > Richard W.M. Jones wrote:
>  >> +OBJS+= wdt_ib700.o wdt_i6300esb.o
>  >
>  > 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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]