From owner-freebsd-current@FreeBSD.ORG Tue Apr 5 15:11:41 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8C4BC16A635 for ; Tue, 5 Apr 2005 15:11:41 +0000 (GMT) Received: from mail22.sea5.speakeasy.net (mail22.sea5.speakeasy.net [69.17.117.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3940643D46 for ; Tue, 5 Apr 2005 15:11:41 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 31492 invoked from network); 5 Apr 2005 15:11:41 -0000 Received: from server.baldwin.cx ([216.27.160.63]) (envelope-sender )AES256-SHA encrypted SMTP for ; 5 Apr 2005 15:11:40 -0000 Received: from [10.50.41.231] (gw1.twc.weather.com [216.133.140.1]) (authenticated bits=0) by server.baldwin.cx (8.13.1/8.13.1) with ESMTP id j35FB3gh065755; Tue, 5 Apr 2005 11:11:30 -0400 (EDT) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: freebsd-current@FreeBSD.org Date: Tue, 5 Apr 2005 11:10:35 -0400 User-Agent: KMail/1.6.2 References: <424EF205.6010202@root.org> <20050402234142.440b3449.antoine.brodin@laposte.net> In-Reply-To: <20050402234142.440b3449.antoine.brodin@laposte.net> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Message-Id: <200504051110.35735.jhb@FreeBSD.org> X-Spam-Status: No, score=-102.8 required=4.2 tests=ALL_TRUSTED, USER_IN_WHITELIST autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on server.baldwin.cx cc: Nate Lawson cc: k-gleb@yandex.ru cc: dan.cojocar@gmail.com cc: Antoine Brodin Subject: Re: Interrupt storm X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Apr 2005 15:11:41 -0000 On Saturday 02 April 2005 04:41 pm, Antoine Brodin wrote: > Nate Lawson wrote: > > I'm a little confused. I don't know of anyone that has problems with > > the 6-current PCI irq code that works on 5-stable (which is what your > > cvs command updates it to). > > > > Do either of you have a problem with irq routing on 6-current that works > > on 5-stable? Please send details if so. > > Hi, > > I have this problem too, but since it's on a desktop I didn't really > care about acpi. > > Here are some details: > > current with pci irq code from 23-Nov-2004 dmesg: > http://bsd.miki.eu.org/~antoine/current+oldacpi.dmesg > > current with current pci irq code dmesg: > http://bsd.miki.eu.org/~antoine/current+acpi.dmesg > (there are timeouts and interrupt storms) > > acpi tables and asl: > http://bsd.miki.eu.org/~antoine/acpidump So the differences in actual IRQ assignments look like this: 13c13 < pcib1: slot 4 INTA routed to irq 5 via \\_SB_.PCI0.LNK2 --- > pcib1: slot 4 INTA routed to irq 9 via \\_SB_.PCI0.LNK2 15,16c15,16 < pcib1: slot 7 INTA is already routed to irq 12 < pcib1: slot 10 INTA routed to irq 11 via \\_SB_.PCI0.LNK1 --- > pcib1: slot 7 INTA routed to irq 12 via \\_SB_.PCI0.LNK4 > pcib1: slot 10 INTA routed to irq 12 via \\_SB_.PCI0.LNK1 That is, LNK2 is routed to 9 rather than 5 and LNK1 is routed to 12 rather than 11. I'm not sure why it does this unless somehow the wrong device_t is getting associated with a handle. > grep 'LNK[12]' current+acpi.dmesg pci_link10: irq 11 on acpi0 pci_link11: irq 5 on acpi0 pcib1: matched entry for 1.4.INTA (src \\_SB_.PCI0.LNK2:0) pcib1: slot 4 INTA routed to irq 9 via \\_SB_.PCI0.LNK2 pcib1: matched entry for 1.10.INTA (src \\_SB_.PCI0.LNK1:0) pcib1: slot 10 INTA routed to irq 12 via \\_SB_.PCI0.LNK1 Can you apply this patch and provide a non-verbose dmesg? --- //depot/vendor/freebsd/src/sys/dev/acpica/acpi_pci_link.c 2005/01/18 20:21:25 +++ //depot/user/jhb/acpipci/dev/acpica/acpi_pci_link.c 2005/04/05 15:07:33 @@ -913,15 +914,20 @@ * If we have a valid BIOS IRQ, use that. We trust what the BIOS * says it routed over what _CRS says the link thinks is routed. */ - if (PCI_INTERRUPT_VALID(link->l_bios_irq)) + if (PCI_INTERRUPT_VALID(link->l_bios_irq)) { + device_printf(dev, "Using BIOS IRQ %d\n", link->l_bios_irq); return (link->l_bios_irq); + } /* * If we don't have a BIOS IRQ but do have a valid IRQ from _CRS, * then use that. */ - if (PCI_INTERRUPT_VALID(link->l_initial_irq)) + if (PCI_INTERRUPT_VALID(link->l_initial_irq)) { + device_printf(dev, "Using initial IRQ %d\n", + link->l_initial_irq); return (link->l_initial_irq); + } /* * Ok, we have no useful hints, so we have to pick from the @@ -955,7 +961,7 @@ } } - if (bootverbose) { + if (bootverbose || 1) { if (PCI_INTERRUPT_VALID(best_irq)) device_printf(dev, "Picked IRQ %u with weight %d\n", best_irq, best_weight); @@ -969,6 +975,9 @@ { struct link *link; + device_printf(dev, "Routing index %d\n", index); + device_printf(dev, "My handle maps to %s\n", + acpi_name(acpi_get_handle(dev)); ACPI_SERIAL_BEGIN(pci_link); link = acpi_pci_link_lookup(dev, index); if (link == NULL) @@ -982,6 +991,7 @@ KASSERT(PCI_INTERRUPT_VALID(link->l_irq), ("%s: link is routed but has an invalid IRQ", __func__)); ACPI_SERIAL_END(pci_link); + device_printf(dev, "Already routed to %d\n", link->l_irq); return (link->l_irq); } --- //depot/vendor/freebsd/src/sys/dev/acpica/acpi_pcib.c 2005/03/08 17:25:15 +++ //depot/user/jhb/acpipci/dev/acpica/acpi_pcib.c 2005/04/05 15:09:09 @@ -225,7 +225,7 @@ } prt = pr.pr_entry; - if (bootverbose) { + if (bootverbose || 1) { device_printf(pcib, "matched entry for %d.%d.INT%c", pci_get_bus(dev), pci_get_slot(dev), 'A' + pin); if (prt->Source != NULL && prt->Source[0] != '\0') @@ -259,7 +259,7 @@ interrupt = acpi_pci_link_route_interrupt(acpi_get_device(lnkdev), prt->SourceIndex); - if (bootverbose && PCI_INTERRUPT_VALID(interrupt)) + if (/* bootverbose &&*/ PCI_INTERRUPT_VALID(interrupt)) device_printf(pcib, "slot %d INT%c routed to irq %d via %s\n", pci_get_slot(dev), 'A' + pin, interrupt, acpi_name(lnkdev)); -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org