From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH 5/6] xen/hvm kexec: unregister timer interrupt during reboot Date: Wed, 27 Jul 2011 10:38:50 -0400 Message-ID: <20110727143850.GA25953@dumpdata.com> References: <20110726115209.655568638@aepfle.de> <20110726115211.204484318@aepfle.de> <20110726142223.GG5994@dumpdata.com> <20110727140512.GA17515@aepfle.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20110727140512.GA17515@aepfle.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Olaf Hering Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Wed, Jul 27, 2011 at 04:05:12PM +0200, Olaf Hering wrote: > On Tue, Jul 26, Konrad Rzeszutek Wilk wrote: > > > On Tue, Jul 26, 2011 at 01:52:14PM +0200, Olaf Hering wrote: > > > The kexec kernel will crash because the timer interrupt is already > > > registerd with EVTCHNOP_bind_virq. Unbind the event channel during > > > shutdown so that the kexec kernel can reregister the interrupt. > > > > > > Signed-off-by: Olaf Hering > > > > > > --- > > > arch/x86/xen/time.c | 27 ++++++++++++++++++++++++--- > > > 1 file changed, 24 insertions(+), 3 deletions(-) > > > > > > Index: linux-3.0/arch/x86/xen/time.c > > > =================================================================== > > > --- linux-3.0.orig/arch/x86/xen/time.c > > > +++ linux-3.0/arch/x86/xen/time.c > > > @@ -14,6 +14,7 @@ > > > #include > > > #include > > > #include > > > +#include > > > > > > #include > > > #include > > > @@ -405,12 +406,20 @@ void xen_setup_timer(int cpu) > > > evt->irq = irq; > > > } > > > > > > -void xen_teardown_timer(int cpu) > > > +static void xen_unbind_timer(int cpu) > > > { > > > struct clock_event_device *evt; > > > - BUG_ON(cpu == 0); > > > evt = &per_cpu(xen_clock_events, cpu); > > > - unbind_from_irqhandler(evt->irq, NULL); > > > + if (evt->irq >= 0) { > > > + unbind_from_irqhandler(evt->irq, NULL); > > > + evt->irq = -1; > > > + } > > > +} > > > + > > > +void xen_teardown_timer(int cpu) > > > +{ > > > + BUG_ON(cpu == 0); > > > > Why the BUG? Ah you just copied it from xen_unbind_timer. > > Hm, I wonder if we actually need that BUG_ON. > > A quick grep did not show up the place where > /sys/devices/system/cpu/cpu0/online would have been created. Since that > file is missing in my guest I think cpu0 can not be shutdown, So that > BUG_ON() can probably go. ok, Thanks for looking around for that. If you can just send that BUG_ON() remove check as a seperate cleanup patch it would be much appreciated. (either before this patch or after it). > > Olaf > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel