From: "Jan Beulich" Subject: Re: [PATCH 2/3] x86/watchdog: Tweak implementation given new common code. Date: Mon, 12 Aug 2013 14:49:45 +0100 Message-ID: <5209041902000078000EB394@nat28.tlf.novell.com> References: <1376314680-12548-1-git-send-email-andrew.cooper3@citrix.com> <1376314680-12548-3-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1V8sVK-0002sd-4L for xen-devel@lists.xenproject.org; Mon, 12 Aug 2013 13:49:50 +0000 In-Reply-To: <1376314680-12548-3-git-send-email-andrew.cooper3@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: xen-devel , Keir Fraser , Tim Deegan List-Id: xen-devel@lists.xenproject.org >>> On 12.08.13 at 15:37, Andrew Cooper wrote: > --- a/xen/arch/x86/nmi.c > +++ b/xen/arch/x86/nmi.c > @@ -419,6 +419,9 @@ int __init watchdog_setup(void) > { > unsigned int cpu; > > + if ( !opt_watchdog ) > + return 0; > + > /* > * Activate periodic heartbeats. We cannot do this earlier during > * setup because the timer infrastructure is not available. This and the last hunk below look pretty pointless, i.e. in fact the patch could consist of just the middle one. Jan > @@ -435,8 +438,7 @@ void nmi_watchdog_tick(struct cpu_user_regs * regs) > { > unsigned int sum = this_cpu(nmi_timer_ticks); > > - if ( (this_cpu(last_irq_sums) == sum) && > - !atomic_read(&watchdog_disable_count) ) > + if ( (this_cpu(last_irq_sums) == sum) && watchdog_enabled() ) > { > /* > * Ayiee, looks like this CPU is stuck ... wait for the timeout > diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c > index c550e8e..2d1edb5 100644 > --- a/xen/arch/x86/setup.c > +++ b/xen/arch/x86/setup.c > @@ -1310,8 +1310,7 @@ void __init __start_xen(unsigned long mbi_p) > > do_initcalls(); > > - if ( opt_watchdog ) > - watchdog_setup(); > + watchdog_setup(); > > if ( !tboot_protect_mem_regions() ) > panic("Could not protect TXT memory regions\n"); > -- > 1.7.10.4