From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeremy Fitzhardinge Subject: Re: Re: Continuing problems booting Date: Tue, 10 Mar 2009 10:13:40 -0700 Message-ID: <49B69FC4.9050204@goop.org> References: <49A0F68D.9070306@goop.org> <49A187B8.7000902@goop.org> <49A1DD80.1080903@goop.org> <49A241EC.3050300@goop.org> <49A890FF.4080803@goop.org> <49ABAF7C.6050906@redhat.com> <49AF5FEB.4010508@goop.org> <49AF80C1.2060307@redhat.com> <49AFB122.5040301@redhat.com> <49B02069.5000207@goop.org> <49B12FE4.7050503@redhat.com> <49B13F2F.1060100@goop.org> <49B1426E.3080901@redhat.com> <49B14A87.1030504@goop.org> <49B51796.1050005@redhat.com> <49B542D5.1070601@goop.org> <49B6356D.20603@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <49B6356D.20603@redhat.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Gerd Hoffmann Cc: xen-devel@lists.xensource.com, M A Young List-Id: xen-devel@lists.xenproject.org Gerd Hoffmann wrote: > Jeremy Fitzhardinge wrote: > >> Yes, that's what I suspected. Can you write up a proper patch? >> > > I've two patches for you. The first turns the silly "xen-pirq-pirq" in > /proc/interrupts into something useful. The second does proper legacy > irq setup on top of that. > Could you s-o-b them too? > + if (0 == nr_ioapics) { > + for (irq=0; irq < NR_IRQS_LEGACY; irq++) > + xen_allocate_pirq(irq, "legacy"); > + return; > + } > I guess the assumption here is that if there's no ioapics, we don't have acpi? Or I guess it doesn't matter because we can't program the triggering anyway. > + > /* Pre-allocate legacy irqs */ > for (irq=0; irq < NR_IRQS_LEGACY; irq++) { > - int trigger, polarity; > - > - if (acpi_get_override_irq(irq, &trigger, &polarity) == -1) > - continue; > + int trigger= 1, polarity = 0; > > + acpi_get_override_irq(irq, &trigger, &polarity); > xen_register_gsi(irq, > trigger ? ACPI_LEVEL_SENSITIVE : ACPI_EDGE_SENSITIVE, > polarity ? ACPI_ACTIVE_LOW : ACPI_ACTIVE_HIGH); I don't think this is correct, for two reasons. 1: I think the default ISA triggering is edge/active low, so this will result in screaming interrupts if we ever use the defaults, but 2: acpi_get_override_irq() returns the appropriate default for ISA anyway, and we shouldn't do anything if it fails (otherwise we might try to do things to magic-irq 2 which could upset things, though I suspect Xen will stop anything really bad from happening). J