Re: Fatal trap 12: page fault while in kernel mode

From: Noriyoshi Kawano <bowie_at_nrik.jp>
Date: Thu, 24 Jul 2003 13:27:39 +0900
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
_at__at_ -177,6 +177,12 _at__at_
 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
_at__at_ -801,6 +807,9 _at__at_
 
 	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.
_at__at_ -812,6 +821,7 _at__at_
 			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);
Received on Wed Jul 23 2003 - 19:27:45 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:16 UTC