From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: Re: [PATCH] irq: Exclude percpu IRQs from being fixed up Date: Wed, 16 Feb 2011 14:53:34 +0000 Message-ID: <4D5BF2FE02000078000322EB@vpn.id2.novell.com> References: <1A42CE6F5F474C41B63392A5F80372B2335E978D@shsmsx501.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <1A42CE6F5F474C41B63392A5F80372B2335E978D@shsmsx501.ccr.corp.intel.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Fengzhe Zhang Cc: Jeremy Fitzhardinge , xen-devel , Eddie Dong , Xin Li List-Id: xen-devel@lists.xenproject.org >>> On 16.02.11 at 15:26, "Zhang, Fengzhe" = wrote: > irq: Exclude percpu IRQs from being fixed up >=20 > Xen spin unlock uses spurious ipi "lock_kicker_irq" to wake up blocked = vCPUs=20 > waiting on that lock. This irq should always be disabled. However, when = Dom0=20 > is shuting down, function fixup_irqs is called which unmasks all = irqs.=20 > Function unmask_irq effectively re-enables lock_kicker_irq and its irq = handler=20 > is invoked which reports bug and crashes Dom0. >=20 > This patch sets IRQ_PER_CPU flag in irq desc and excludes percpu IRQs = from=20 > being fixed up when taking CPUs down. >=20 > Signed-off-by: Fengzhe Zhang >=20 > diff --git a/arch/x86/kernel/irq_64.c b/arch/x86/kernel/irq_64.c > index 977d8b4..f0f9450 100644 > --- a/arch/x86/kernel/irq_64.c > +++ b/arch/x86/kernel/irq_64.c > @@ -80,6 +80,9 @@ void fixup_irqs(void) > if (irq =3D=3D 2) > continue; > =20 > + if (desc->status & IRQ_PER_CPU) > + continue; > + > /* interrupt's are disabled at this point */ > spin_lock(&desc->lock); > =20 > diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c > index f34e231..26bc55a 100644 > --- a/kernel/irq/manage.c > +++ b/kernel/irq/manage.c > @@ -727,10 +727,9 @@ __setup_irq(unsigned int irq, struct irq_desc = *desc,=20 > struct irqaction *new) > goto out_thread; > } else > compat_irq_chip_set_default_handler(desc); > -#if defined(CONFIG_IRQ_PER_CPU) Why? XEN should select IRQ_PER_CPU instead in its Kconfig. Jan > + > if (new->flags & IRQF_PERCPU) > desc->status |=3D IRQ_PER_CPU; > -#endif > =20 > desc->status &=3D ~(IRQ_AUTODETECT | IRQ_WAITING | = IRQ_ONESHOT | > IRQ_INPROGRESS | IRQ_SPURIOUS_DISABLED);