From owner-freebsd-current@FreeBSD.ORG Wed Jul 23 21:27:45 2003 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 547D237B401 for ; Wed, 23 Jul 2003 21:27:45 -0700 (PDT) Received: from brain.nrik.jp (ntoska037096.oska.nt.adsl.ppp.infoweb.ne.jp [218.217.200.96]) by mx1.FreeBSD.org (Postfix) with ESMTP id 34A2B43F75 for ; Wed, 23 Jul 2003 21:27:44 -0700 (PDT) (envelope-from bowie@nrik.jp) Received: from brain.nrik.jp (localhost [127.0.0.1]) by brain.nrik.jp (8.12.9/8.12.9) with ESMTP id h6O4ReXt016768; Thu, 24 Jul 2003 13:27:40 +0900 (JST) (envelope-from bowie@nrik.jp) Date: Thu, 24 Jul 2003 13:27:39 +0900 Message-ID: <86u19c8s78.wl@brain.nrik.jp> From: Noriyoshi Kawano To: current@freebsd.org In-Reply-To: <20030723133111.S92624@carver.gumbysoft.com> References: <20030721103221.C95793@mbox.cksoft.de> <86n0f82r2c.wl@brain.nrik.jp> <20030723133111.S92624@carver.gumbysoft.com> User-Agent: Wanderlust/2.10.0 (Venus) SEMI/1.14.5 (Awara-Onsen) FLIM/1.14.5 (Demachiyanagi) APEL/10.4 Emacs/21.3 (i386--freebsd) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: text/plain; charset=US-ASCII Subject: Re: Fatal trap 12: page fault while in kernel mode 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: Thu, 24 Jul 2003 04:27:45 -0000 At Wed, 23 Jul 2003 13:31:31 -0700 (PDT), Doug White wrote: > > On Mon, 21 Jul 2003, Bjoern A. Zeeb wrote: > > > Thanks. This works fine. Is there any "global" solution to the problem > > so that I won't need to patch again the time 5.2R comes out ? > > Smells like a good candiate for a TUNABLE. Are they the following patches? --- /sys/dev/pci/pci.c.orig Tue Jul 1 23:08:32 2003 +++ /sys/dev/pci/pci.c Thu Jul 24 13:17:03 2003 @@ -177,6 +177,12 @@ enable these bits correctly. We'd like to do this all the time, but there\n\ are some peripherals that this causes problems with."); +static int pci_enable_rerouting = 1; +TUNABLE_INT("hw.pci.enable_rerouting", (int *)&pci_enable_rerouting); +SYSCTL_INT(_hw_pci, OID_AUTO, enable_rerouting, CTLFLAG_RW, + &pci_enable_rerouting, 1, + "Enable try to re-route interrupts."); + /* Find a device_t by bus/slot/function */ device_t @@ -801,6 +807,9 @@ if (cfg->intpin > 0 && PCI_INTERRUPT_VALID(cfg->intline)) { #if defined(__ia64__) || (defined(__i386__) && !defined(SMP)) + if (!pci_enable_rerouting){ + goto nottry; + } /* * Try to re-route interrupts. Sometimes the BIOS or * firmware may leave bogus values in these registers. @@ -812,6 +821,7 @@ pci_write_config(dev, PCIR_INTLINE, irq, 1); cfg->intline = irq; } else +nottry: #endif irq = cfg->intline; resource_list_add(rl, SYS_RES_IRQ, 0, irq, irq, 1);