From: "Jan Beulich" Subject: [PATCH] make c/s 21089 work again with c/s 21092 Date: Tue, 13 Apr 2010 14:36:55 +0100 Message-ID: <4BC48F97020000780003A003@vpn.id2.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__PartF3D97167.1__=" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: Bastian Blank List-Id: xen-devel@lists.xenproject.org This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__PartF3D97167.1__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Unfortunately the latter c/s' change to mpparse.c yielded the former patch non-functional - Xen's serial port IRQ is not in IQR_DISABLED state, yet must be allowed to get its trigger mode and polarity set up in order for it to be usable. Signed-off-by: Jan Beulich --- 2010-04-13.orig/xen/arch/x86/mpparse.c 2010-04-13 15:25:22.0000000= 00 +0200 +++ 2010-04-13/xen/arch/x86/mpparse.c 2010-04-13 15:26:38.000000000 = +0200 @@ -1103,6 +1103,8 @@ int mp_register_gsi (u32 gsi, int trigge int ioapic =3D -1; int ioapic_pin =3D 0; int idx, bit =3D 0; + struct irq_desc * desc; + unsigned long flags; =20 /* * Mapping between Global System Interrups, which @@ -1127,8 +1129,13 @@ int mp_register_gsi (u32 gsi, int trigge if (ioapic_renumber_irq) gsi =3D ioapic_renumber_irq(ioapic, gsi); =20 - if (!(irq_to_desc(gsi)->status & IRQ_DISABLED)) + desc =3D irq_to_desc(gsi); + spin_lock_irqsave(&desc->lock, flags); + if (!(desc->status & IRQ_DISABLED) && desc->handler !=3D &no_irq_ty= pe) { + spin_unlock_irqrestore(&desc->lock, flags); return -EEXIST; + } + spin_unlock_irqrestore(&desc->lock, flags); =20 /*=20 * Avoid pin reprogramming. PRTs typically include entries =20 --=__PartF3D97167.1__= Content-Type: text/plain; name="x86-startup-irq-from-setup-gsi-fix2.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="x86-startup-irq-from-setup-gsi-fix2.patch" Unfortunately the latter c/s' change to mpparse.c yielded the former=0Apatc= h non-functional - Xen's serial port IRQ is not in IQR_DISABLED=0Astate, = yet must be allowed to get its trigger mode and polarity set=0Aup in order = for it to be usable.=0A=0ASigned-off-by: Jan Beulich = =0A=0A--- 2010-04-13.orig/xen/arch/x86/mpparse.c 2010-04-13 = 15:25:22.000000000 +0200=0A+++ 2010-04-13/xen/arch/x86/mpparse.c = 2010-04-13 15:26:38.000000000 +0200=0A@@ -1103,6 +1103,8 @@ int mp_register= _gsi (u32 gsi, int trigge=0A int ioapic =3D -1;=0A = int ioapic_pin =3D 0;=0A int = idx, bit =3D 0;=0A+ struct irq_desc * desc;=0A+ unsigned = long flags;=0A =0A /*=0A * Mapping between Global System = Interrups, which=0A@@ -1127,8 +1129,13 @@ int mp_register_gsi (u32 gsi, = int trigge=0A if (ioapic_renumber_irq)=0A gsi =3D ioapic_renu= mber_irq(ioapic, gsi);=0A =0A- if (!(irq_to_desc(gsi)->status & IRQ_DISABL= ED))=0A+ desc =3D irq_to_desc(gsi);=0A+ spin_lock_irqsave(&desc->lo= ck, flags);=0A+ if (!(desc->status & IRQ_DISABLED) && desc->handler !=3D = &no_irq_type) {=0A+ spin_unlock_irqrestore(&desc->lock, = flags);=0A return -EEXIST;=0A+ }=0A+ spin_unlock_irqrest= ore(&desc->lock, flags);=0A =0A /* =0A * Avoid pin reprogramming.= PRTs typically include entries =0A --=__PartF3D97167.1__= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=__PartF3D97167.1__=--