From owner-freebsd-smp@FreeBSD.ORG Mon Jul 25 13:07:30 2005 Return-Path: X-Original-To: freebsd-smp@freebsd.org Delivered-To: freebsd-smp@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4C23B16A420 for ; Mon, 25 Jul 2005 13:07:30 +0000 (GMT) (envelope-from rutger.bevaart@illian.net) Received: from darwin.illian.net (darwin.illian.net [80.69.74.160]) by mx1.FreeBSD.org (Postfix) with ESMTP id BF84943D45 for ; Mon, 25 Jul 2005 13:07:29 +0000 (GMT) (envelope-from rutger.bevaart@illian.net) Received: from localhost (localhost.illian.net [127.0.0.1]) by darwin.illian.net (Postfix) with ESMTP id 0722745145; Mon, 25 Jul 2005 15:07:39 +0200 (CEST) Received: from darwin.illian.net ([127.0.0.1]) by localhost (darwin.illian.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 82112-08; Mon, 25 Jul 2005 15:07:38 +0200 (CEST) Received: from www.illian.net (localhost.illian.net [127.0.0.1]) by darwin.illian.net (Postfix) with ESMTP id 64DDA45074; Mon, 25 Jul 2005 15:07:38 +0200 (CEST) Received: from 193.172.18.3 (SquirrelMail authenticated user rutger); by www.illian.net with HTTP; Mon, 25 Jul 2005 15:07:38 +0200 (CEST) Message-ID: <35454.193.172.18.3.1122296858.squirrel@193.172.18.3> Date: Mon, 25 Jul 2005 15:07:38 +0200 (CEST) From: "Rutger Bevaart" To: "Nicklas B. Westerlund" User-Agent: SquirrelMail/1.4.3a X-Mailer: SquirrelMail/1.4.3a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal References: <42DB998F.6070005@dinpris.no> <28639.193.172.18.3.1121763400.squirrel@193.172.18.3> <42DCC62C.30006@dinpris.no> <49022.193.172.18.3.1121773163.squirrel@193.172.18.3> <42DCEE0A.5000907@dinpris.no> In-Reply-To: <42DCEE0A.5000907@dinpris.no> X-Virus-Scanned: amavisd-new at illian.net Cc: freebsd-smp@freebsd.org Subject: Re: FreeBSD unstable on Dell 1750 using SMP? X-BeenThere: freebsd-smp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD SMP implementation group List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2005 13:07:30 -0000 I upgraded one of the 1750's to 5.4-p5 this weekend without any problems. SMP and HT are both enabled just as when running 5.3 and we compiled the kernel using the same config file as not to skew any results. After letting this runs for a few weeks we'll be able to tell if stability has improved and the random crashes have disappeared. I'm curious though if anybody has seen this behaviour in 4.9, 4.10 or 4.11. We're seeing it there as well (on 1750's) although those are heavily loaded and crash once every 100'something days. Cheers, Rutger On Tue, July 19, 2005 14:11, Nicklas B. Westerlund said: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Rutger Bevaart wrote: > >> Thanks for the insight, will post back what happens! > Good luck, I think RELENG_5_4 will help you, I know it's stable for us. > > Looking forward to see your results after this weekend. > > > Nick. > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.1 (MingW32) > > iD8DBQFC3O4K/EJDK6FqoK4RAtTjAJ90vAraPrchu8PtmSgO8PdQxiJsSQCgtfWZ Duoc4bNwu+6EH7mhusUPcWY= > =aAkk > -----END PGP SIGNATURE----- > > Rutger Bevaart :: illian.networks From owner-freebsd-smp@FreeBSD.ORG Fri Jul 29 17:45:48 2005 Return-Path: X-Original-To: freebsd-smp@freebsd.org Delivered-To: freebsd-smp@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6FA0316A41F for ; Fri, 29 Jul 2005 17:45:48 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from mv.twc.weather.com (mv.twc.weather.com [65.212.71.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id E580543D46 for ; Fri, 29 Jul 2005 17:45:47 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from [10.50.40.201] (Not Verified[65.202.103.25]) by mv.twc.weather.com with NetIQ MailMarshal (v6, 0, 3, 8) id ; Fri, 29 Jul 2005 14:00:18 -0400 From: John Baldwin To: freebsd-smp@freebsd.org, hvleest@signet.nl Date: Fri, 29 Jul 2005 13:22:39 -0400 User-Agent: KMail/1.8 References: <42CD9115.70302@signet.nl> In-Reply-To: <42CD9115.70302@signet.nl> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200507291322.40113.jhb@FreeBSD.org> Cc: Subject: Re: SMP boot errors X-BeenThere: freebsd-smp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD SMP implementation group List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2005 17:45:48 -0000 On Thursday 07 July 2005 04:31 pm, Hans van Leest wrote: > Hello, > > I've posted last week also my problems with a SMP kernel on a dual XEON > machine. > > Maybe this error message is better to debug, I hope > > I've upgraded the source to 6.0 current. Did not modify my GENERIC file > and compiled the source. This inclusus the options SMP and device APIC. > I've booted several times and had the same error: > > panic: multiple IRQs for PCI interrupt 0.31.INTA 18 AND 16 > > > Where to start to fix this! Ok, I have a patch you can try to use to work around this. Apply this patch and then try setting 'hw.pci0.31.INTA.irq=16' from the loader to force that specific PCI interrupt to IRQ 16. If that results in interrupt storms, you can try setting it to 18 instead of 16. --- //depot/vendor/freebsd/src/sys/dev/pci/pci.c 2005/06/03 19:45:18 +++ //depot/user/jhb/acpipci/dev/pci/pci.c 2005/07/29 14:35:47 @@ -76,6 +76,8 @@ static int pci_porten(device_t pcib, int b, int s, int f); static int pci_memen(device_t pcib, int b, int s, int f); +static int pci_assign_interrupt(device_t bus, device_t dev, + int force_route); static int pci_add_map(device_t pcib, device_t bus, device_t dev, int b, int s, int f, int reg, struct resource_list *rl); @@ -922,6 +924,52 @@ } static void +pci_assign_interrupt(device_t bus, device_t dev, int force_route) +{ + struct pci_devinfo *dinfo = device_get_ivars(dev); + pcicfgregs *cfg = &dinfo->cfg; + char tunable_name[64]; + int irq; + + /* Has to have an intpin to have an interrupt. */ + if (cfg->intpin == 0) + return; + + /* Let the user override the IRQ with a tunable. */ + irq = PCI_INVALID_IRQ; + snprintf(tunable_name, sizeof(tunable_name), "hw.pci%d.%d.INT%c.irq", + cfg->bus, cfg->slot, cfg->intpin + 'A' - 1); + if (TUNABLE_INT_FETCH(tunable_name, &irq) && (irq >= 255 || irq <= 0)) + irq = PCI_INVALID_IRQ; + + /* + * If we didn't get an IRQ via the tunable, then we either use the + * IRQ value in the intline register or we ask the bus to route an + * interrupt for us. If force_route is true, then we only use the + * value in the intline register if the bus was unable to assign an + * IRQ. + */ + if (!PCI_INTERRUPT_VALID(irq)) { + irq = cfg->intline; + if (!PCI_INTERRUPT_VALID(irq) || force_route) + irq = PCI_ASSIGN_INTERRUPT(bus, dev); + } + + /* If after all that we don't have an IRQ, just bail. */ + if (!PCI_INTERRUPT_VALID(irq)) + return; + + /* Update the config register if it changed. */ + if (irq != cfg->intline) { + cfg->intline = irq; + pci_write_config(dev, PCIR_INTLINE, irq, 1); + } + + /* Add this IRQ as rid 0 interrupt resource. */ + resource_list_add(&dinfo->resources, SYS_RES_IRQ, 0, irq, irq, 1); +} + +static void pci_add_resources(device_t pcib, device_t bus, device_t dev) { struct pci_devinfo *dinfo = device_get_ivars(dev); @@ -959,14 +1007,10 @@ * If the re-route fails, then just stick with what we * have. */ - irq = PCI_ASSIGN_INTERRUPT(bus, dev); - if (PCI_INTERRUPT_VALID(irq)) { - pci_write_config(dev, PCIR_INTLINE, irq, 1); - cfg->intline = irq; - } else + pci_assign_interrupt(bus, dev, 1); +#else + pci_assign_interrupt(bus, dev, 0); #endif - irq = cfg->intline; - resource_list_add(rl, SYS_RES_IRQ, 0, irq, irq, 1); } } @@ -1705,15 +1749,8 @@ * interrupt, try to assign it one. */ if (!PCI_INTERRUPT_VALID(cfg->intline) && - (cfg->intpin != 0)) { - cfg->intline = PCI_ASSIGN_INTERRUPT(dev, child); - if (PCI_INTERRUPT_VALID(cfg->intline)) { - pci_write_config(child, PCIR_INTLINE, - cfg->intline, 1); - resource_list_add(rl, SYS_RES_IRQ, 0, - cfg->intline, cfg->intline, 1); - } - } + (cfg->intpin != 0)) + pci_assign_interrupt(dev, child, 0); break; case SYS_RES_IOPORT: case SYS_RES_MEMORY: -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org