NetBSD Problem Report #36727

From martin@duskware.de  Fri Aug  3 09:43:46 2007
Return-Path: <martin@duskware.de>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 7C2D563B8EA
	for <gnats-bugs@gnats.netbsd.org>; Fri,  3 Aug 2007 09:43:46 +0000 (UTC)
Message-Id: <20070803094142.B273363B8EA@narn.NetBSD.org>
Date: Fri,  3 Aug 2007 09:41:42 +0000 (UTC)
From: ianm@cat.co.za
Reply-To: ianm@cat.co.za
To: netbsd-bugs-owner@NetBSD.org
Subject: lkms that work with Single processor kernel do not work with muli-processor kernel
X-Send-Pr-Version: www-1.0

>Number:         36727
>Category:       kern
>Synopsis:       lkms that work with Single processor kernel do not work with muli-processor kernel
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Aug 03 09:45:00 +0000 2007
>Last-Modified:  Thu Aug 23 09:15:01 +0000 2007
>Originator:     Ian McIntosh
>Release:        netBSD 3.1_STABLE
>Organization:
Cathexis
>Environment:
NetBSD core2core2 3.1_STABLE (GENERIC.MPACPI) #0: Thu Jul 26 23:04:22 SAST 2007 /usr/src/sys/arch/i386/compile/GENERIC.MPACPI i386
>Description:
LKM's used for our PCI cards function correctly with a single processor kernel but do not function with a multiprocessor kernel. The lkms are compiled with -DMULTIPROCESSOR and without any options that change the size of the structures.

The LKM appears to load correctly in that it passes all the PCI setup and also gets assigned an interrupt pin.

The problem is that once the lkm loads it doesn't get any interrupts. A look at dmesg indicates that the driver has been assigned ioapic0 pin 11 as its interrupt pin but vmstat indicates there are no interrupts being generated for this pin.
However the interrupt counts for ioapic0 pin 17 seem to be going wild. A top on the system indicates that CPU0 is 72% idle when it was 100% idle before the lkm loaded. Looking at /var/log/messages ioapic0 pin 17 is assigned to uhci1 (USB controller I think).  Below is the vmstat before and after the lkm load and the relevant dmesg.


Before running lkm driver
-----------------------------------
interrupt                                     total     rate
cpu0 softclock                                 5836      112
cpu0 softnet                                     45        0
cpu0 softserial                                   0        0
cpu0 timer                                     6039      116
cpu0 halt IPI                                     0        0
cpu0 timeset IPI                                  0        0
cpu0 FPU flush IPI                                0        0
cpu0 FPU synch IPI                                0        0
cpu0 TLB shootdown IPI                          100        1
cpu0 MTRR update IPI                              0        0
cpu0 GDT update IPI                               0        0
cpu1 softclock                                    0        0
cpu1 softnet                                      0        0
cpu1 softserial                                   0        0
cpu1 timer                                     5119       98
cpu1 halt IPI                                     0        0
cpu1 timeset IPI                                 53        1
cpu1 FPU flush IPI                                0        0
cpu1 FPU synch IPI                                1        0
cpu1 TLB shootdown IPI                          845       16
cpu1 MTRR update IPI                              0        0
cpu1 GDT update IPI                               0        0
ioapic0 pin 9                                     0        0
ioapic0 pin 6                                     1        0
ioapic0 pin 7                                     0        0
ioapic0 pin 4                                     0        0
ioapic0 pin 1                                   245        4
ioapic0 pin 12                                    0        0
ioapic0 pin 19                                   10        0
ioapic0 pin 20                                    0        0
ioapic0 pin 17                                    0        0
ioapic0 pin 18                                    0        0
ioapic0 pin 21                                   55        1
ioapic0 pin 14                                    0        0
ioapic0 pin 15                                    0        0
ioapic0 pin 23                                 1892       36
Total                                         20241      389


After loading LKM driver
-----------------------------------
interrupt                                     total     rate
cpu0 softclock                                40713      101
cpu0 softnet                                    443        1
cpu0 softserial                                   0        0
cpu0 timer                                    40916      102
cpu0 halt IPI                                     0        0
cpu0 timeset IPI                                  0        0
cpu0 FPU flush IPI                                0        0
cpu0 FPU synch IPI                                1        0
cpu0 TLB shootdown IPI                          182        0
cpu0 MTRR update IPI                              0        0
cpu0 GDT update IPI                               0        0
cpu1 softclock                                    0        0
cpu1 softnet                                      0        0
cpu1 softserial                                   0        0
cpu1 timer                                    39996       99
cpu1 halt IPI                                     0        0
cpu1 timeset IPI                                402        1
cpu1 FPU flush IPI                                0        0
cpu1 FPU synch IPI                                1        0
cpu1 TLB shootdown IPI                         1426        3
cpu1 MTRR update IPI                              0        0
cpu1 GDT update IPI                               0        0
ioapic0 pin 9                                     0        0
ioapic0 pin 6                                     1        0
ioapic0 pin 7                                     0        0
ioapic0 pin 4                                     0        0
ioapic0 pin 1                                   628        1
ioapic0 pin 12                                    0        0
ioapic0 pin 19                                   10        0
ioapic0 pin 20                                    0        0
ioapic0 pin 17                             88155626   219839
ioapic0 pin 18                                    0        0
ioapic0 pin 21                                  517        1
ioapic0 pin 14                                    0        0
ioapic0 pin 15                                    0        0
ioapic0 pin 23                                 2231        5
ioapic0 pin 11                                    0        0
Total                                      88283093   220157






Jul 27 01:57:27 core2core2 /netbsd: NetBSD 3.1_STABLE (GENERIC.MPACPI) #0: Thu Jul 26 23:04:22 SAST 2007
Jul 27 01:57:27 core2core2 /netbsd: root@core2core2:/usr/src/sys/arch/i386/compile/GENERIC.MPACPI
Jul 27 01:57:27 core2core2 /netbsd: total memory = 503 MB
Jul 27 01:57:27 core2core2 /netbsd: avail memory = 483 MB
Jul 27 01:57:27 core2core2 /netbsd: BIOS32 rev. 0 found at 0xf0010
Jul 27 01:57:27 core2core2 /netbsd: mainbus0 (root)
Jul 27 01:57:27 core2core2 /netbsd: cpu0 at mainbus0: apid 0 (boot processor)
Jul 27 01:57:27 core2core2 /netbsd: cpu0: Intel Pentium Pro, II or III (686-class), 1866.68 MHz, id 0x6f2
Jul 27 01:57:27 core2core2 /netbsd: cpu0: features bfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR>
Jul 27 01:57:27 core2core2 /netbsd: cpu0: features bfebfbff<PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX>
Jul 27 01:57:27 core2core2 /netbsd: cpu0: features bfebfbff<FXSR,SSE,SSE2,SS,HTT,TM,SBF>
Jul 27 01:57:27 core2core2 /netbsd: cpu0: features2 e3bd<SSE3,MONITOR,DS-CPL,VMX,EST,TM2,xTPR>
Jul 27 01:57:27 core2core2 /netbsd: cpu0: "Intel(R) Core(TM)2 CPU          6300  @ 1.86GHz"
Jul 27 01:57:27 core2core2 /netbsd: cpu0: I-cache 32 KB 64B/line 8-way, D-cache 32 KB 64B/line 8-way
Jul 27 01:57:27 core2core2 /netbsd: cpu0: L2 cache 2 MB 64B/line 8-way
Jul 27 01:57:27 core2core2 /netbsd: cpu0: using thermal monitor 1
Jul 27 01:57:27 core2core2 /netbsd: cpu0: Enhanced SpeedStep (1340 mV)  - unknown CPU or operating point.
Jul 27 01:57:27 core2core2 /netbsd: cpu0: calibrating local timer
Jul 27 01:57:27 core2core2 /netbsd: cpu0: apic clock running at 266 MHz
Jul 27 01:57:27 core2core2 /netbsd: cpu0: 64 page colors
Jul 27 01:57:27 core2core2 /netbsd: cpu1 at mainbus0: apid 1 (application processor)
Jul 27 01:57:27 core2core2 /netbsd: cpu1: starting
Jul 27 01:57:27 core2core2 /netbsd: cpu1: Intel Pentium Pro, II or III (686-class), 1866.61 MHz, id 0x6f2
Jul 27 01:57:27 core2core2 /netbsd: cpu1: features bfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR>
Jul 27 01:57:27 core2core2 /netbsd: cpu1: features bfebfbff<PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX>
Jul 27 01:57:27 core2core2 /netbsd: cpu1: features bfebfbff<FXSR,SSE,SSE2,SS,HTT,TM,SBF>
Jul 27 01:57:27 core2core2 /netbsd: cpu1: features2 e3bd<SSE3,MONITOR,DS-CPL,VMX,EST,TM2,xTPR>
Jul 27 01:57:27 core2core2 /netbsd: cpu1: "Intel(R) Core(TM)2 CPU          6300  @ 1.86GHz"
Jul 27 01:57:27 core2core2 /netbsd: cpu1: I-cache 32 KB 64B/line 8-way, D-cache 32 KB 64B/line 8-way
Jul 27 01:57:27 core2core2 /netbsd: cpu1: L2 cache 2 MB 64B/line 8-way
Jul 27 01:57:27 core2core2 /netbsd: cpu1: using thermal monitor 1
Jul 27 01:57:27 core2core2 /netbsd: cpu1: Enhanced SpeedStep (1340 mV)  - unknown CPU or operating point.
Jul 27 01:57:27 core2core2 /netbsd: ioapic0 at mainbus0 apid 2 (I/O APIC)
Jul 27 01:57:27 core2core2 /netbsd: ioapic0: pa 0xfec00000, version 20, 24 pins
Jul 27 01:57:27 core2core2 /netbsd: acpi0 at mainbus0
Jul 27 01:57:27 core2core2 /netbsd: acpi0: using Intel ACPI CA subsystem version 20040211
Jul 27 01:57:27 core2core2 /netbsd: acpi0: X/RSDT: OemId <A_M_I_,OEMXSDT ,12000607>, AslId <MSFT,00000097>
Jul 27 01:57:27 core2core2 /netbsd: acpi0: SCI interrupting at int 9
Jul 27 01:57:27 core2core2 /netbsd: acpi0: fixed-feature power button present
Jul 27 01:57:27 core2core2 /netbsd: ACPI Object Type 'Processor' (0x0c) at acpi0 not configured
Jul 27 01:57:27 core2core2 last message repeated 3 times
Jul 27 01:57:27 core2core2 /netbsd: PNP0A08 at acpi0 not configured
Jul 27 01:57:27 core2core2 /netbsd: PNP0C01 [System Board] at acpi0 not configured
Jul 27 01:57:27 core2core2 /netbsd: PNP0000 [AT Interrupt Controller] at acpi0 not configured
Jul 27 01:57:27 core2core2 /netbsd: PNP0200 [AT DMA Controller] at acpi0 not configured
Jul 27 01:57:27 core2core2 /netbsd: PNP0100 [AT Timer] at acpi0 not configured
Jul 27 01:57:27 core2core2 /netbsd: PNP0B00 [AT Real-Time Clock] at acpi0 not configured
Jul 27 01:57:27 core2core2 /netbsd: PNP0800 [AT-style speaker sound] at acpi0 not configured
Jul 27 01:57:27 core2core2 /netbsd: npx0 at acpi0 (PNP0C04)
Jul 27 01:57:27 core2core2 /netbsd: npx0: io 0xf0-0xff irq 13
Jul 27 01:57:27 core2core2 /netbsd: npx0: reported by CPUID; using exception 16
Jul 27 01:57:27 core2core2 /netbsd: fdc0 at acpi0 (PNP0700)
Jul 27 01:57:27 core2core2 /netbsd: fdc0: io 0x3f0-0x3f5,0x3f7 irq 6 drq 2
Jul 27 01:57:27 core2core2 /netbsd: fdc0: expected BUFFER, got 4
Jul 27 01:57:27 core2core2 /netbsd: lpt0 at acpi0 (PNP0401)
Jul 27 01:57:27 core2core2 /netbsd: lpt0: io 0x378-0x37f,0x778-0x77f irq 7 drq 3
Jul 27 01:57:27 core2core2 /netbsd: PNP0C02 [Plug and Play motherboard register resources] at acpi0 not configured
Jul 27 01:57:27 core2core2 /netbsd: PNP0C02 [Plug and Play motherboard register resources] at acpi0 not configured
Jul 27 01:57:27 core2core2 /netbsd: ATK0110 at acpi0 not configured
Jul 27 01:57:27 core2core2 /netbsd: PNP0103 at acpi0 not configured
Jul 27 01:57:27 core2core2 /netbsd: pckbc0 at acpi0 (PNP0303): kbd port
Jul 27 01:57:27 core2core2 /netbsd: pckbc0: io 0x60,0x64 irq 1
Jul 27 01:57:27 core2core2 /netbsd: pckbc1 at acpi0 (PNP0F03): aux port
Jul 27 01:57:27 core2core2 /netbsd: pckbc1: irq 12
Jul 27 01:57:27 core2core2 /netbsd: PNP0C02 [Plug and Play motherboard register resources] at acpi0 not configured
Jul 27 01:57:27 core2core2 /netbsd: com0 at acpi0 (PNP0501-1)
Jul 27 01:57:27 core2core2 /netbsd: com0: io 0x3f8-0x3ff irq 4
Jul 27 01:57:27 core2core2 /netbsd: com0: ns16550a, working fifo
Jul 27 01:57:27 core2core2 /netbsd: INT0800 at acpi0 not configured
Jul 27 01:57:27 core2core2 /netbsd: PNP0C02 [Plug and Play motherboard register resources] at acpi0 not configured
Jul 27 01:57:27 core2core2 /netbsd: PNP0C02 [Plug and Play motherboard register resources] at acpi0 not configured
Jul 27 01:57:27 core2core2 /netbsd: PNP0C01 [System Board] at acpi0 not configured
Jul 27 01:57:27 core2core2 /netbsd: acpibut0 at acpi0 (PNP0C0C-170): ACPI Power Button
Jul 27 01:57:27 core2core2 /netbsd: PNP0C0F [PCI interrupt link device] at acpi0 not configured
Jul 27 01:57:27 core2core2 last message repeated 6 times
Jul 27 01:57:27 core2core2 /netbsd: pckbd0 at pckbc0 (kbd slot)
Jul 27 01:57:27 core2core2 /netbsd: pckbc0: using irq 1 for kbd slot
Jul 27 01:57:27 core2core2 /netbsd: wskbd0 at pckbd0: console keyboard
Jul 27 01:57:27 core2core2 /netbsd: pms0 at pckbc0 (aux slot)
Jul 27 01:57:27 core2core2 /netbsd: pckbc0: using irq 12 for aux slot
Jul 27 01:57:27 core2core2 /netbsd: wsmouse0 at pms0 mux 0
Jul 27 01:57:27 core2core2 /netbsd: pci0 at mainbus0 bus 0: configuration mode 1
Jul 27 01:57:27 core2core2 /netbsd: pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
Jul 27 01:57:27 core2core2 /netbsd: pchb0 at pci0 dev 0 function 0
Jul 27 01:57:27 core2core2 /netbsd: pchb0: Intel 82945G/P Memory Controller Hub (rev. 0x02)
Jul 27 01:57:27 core2core2 /netbsd: vga0 at pci0 dev 2 function 0: Intel product 0x2772 (rev. 0x02)
Jul 27 01:57:27 core2core2 /netbsd: wsdisplay0 at vga0 kbdmux 1: console (80x25, vt100 emulation), using wskbd0
Jul 27 01:57:27 core2core2 /netbsd: wsmux1: connecting to wsdisplay0
Jul 27 01:57:27 core2core2 /netbsd: azalia0 at pci0 dev 27 function 0: Generic High Definition Audio Controller
Jul 27 01:57:27 core2core2 /netbsd: azalia0: interrupting at ioapic0 pin 19 (irq 5)
Jul 27 01:57:27 core2core2 /netbsd: azalia0: host: Intel 82801GB/GR High Definition Audio Controller (rev. 1)
Jul 27 01:57:27 core2core2 /netbsd: azalia0: host: High Definition Audio rev. 1.0
Jul 27 01:57:27 core2core2 /netbsd: ppb0 at pci0 dev 28 function 0: Intel 82801GB/GR PCI Express Port #1 (rev. 0x01)
Jul 27 01:57:27 core2core2 /netbsd: pci1 at ppb0 bus 3
Jul 27 01:57:27 core2core2 /netbsd: pci1: i/o space, memory space enabled, rd/line, wr/inv ok
Jul 27 01:57:27 core2core2 /netbsd: ppb1 at pci0 dev 28 function 1: Intel 82801GB/GR PCI Express Port #2 (rev. 0x01)
Jul 27 01:57:27 core2core2 /netbsd: pci2 at ppb1 bus 2
Jul 27 01:57:27 core2core2 /netbsd: pci2: i/o space, memory space enabled, rd/line, wr/inv ok
Jul 27 01:57:27 core2core2 /netbsd: unknown vendor 0x1969 product 0x1048 (ethernet network, revision 0xb0) at pci2 dev 0 function 0 not configured
Jul 27 01:57:27 core2core2 /netbsd: uhci0 at pci0 dev 29 function 0: Intel 82801GB/GR USB UHCI Controller (rev. 0x01)
Jul 27 01:57:27 core2core2 /netbsd: uhci0: interrupting at ioapic0 pin 20 (irq 3)
Jul 27 01:57:27 core2core2 /netbsd: usb0 at uhci0: USB revision 1.0
Jul 27 01:57:27 core2core2 /netbsd: uhub0 at usb0
Jul 27 01:57:27 core2core2 /netbsd: uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
Jul 27 01:57:27 core2core2 /netbsd: uhub0: 2 ports with 2 removable, self powered
Jul 27 01:57:27 core2core2 /netbsd: uhci1 at pci0 dev 29 function 1: Intel 82801GB/GR USB UHCI Controller (rev. 0x01)
Jul 27 01:57:27 core2core2 /netbsd: uhci1: interrupting at ioapic0 pin 17 (irq 10)
Jul 27 01:57:27 core2core2 /netbsd: usb1 at uhci1: USB revision 1.0
Jul 27 01:57:27 core2core2 /netbsd: uhub1 at usb1
Jul 27 01:57:27 core2core2 /netbsd: uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
Jul 27 01:57:27 core2core2 /netbsd: uhub1: 2 ports with 2 removable, self powered
Jul 27 01:57:27 core2core2 /netbsd: uhci2 at pci0 dev 29 function 2: Intel 82801GB/GR USB UHCI Controller (rev. 0x01)
Jul 27 01:57:27 core2core2 /netbsd: uhci2: interrupting at ioapic0 pin 18 (irq 10)
Jul 27 01:57:27 core2core2 /netbsd: usb2 at uhci2: USB revision 1.0
Jul 27 01:57:27 core2core2 /netbsd: uhub2 at usb2
Jul 27 01:57:27 core2core2 /netbsd: uhub2: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
Jul 27 01:57:27 core2core2 /netbsd: uhub2: 2 ports with 2 removable, self powered
Jul 27 01:57:27 core2core2 /netbsd: uhci3 at pci0 dev 29 function 3: Intel 82801GB/GR USB UHCI Controller (rev. 0x01)
Jul 27 01:57:27 core2core2 /netbsd: uhci3: interrupting at ioapic0 pin 19 (irq 5)
Jul 27 01:57:27 core2core2 /netbsd: usb3 at uhci3: USB revision 1.0
Jul 27 01:57:27 core2core2 /netbsd: uhub3 at usb3
Jul 27 01:57:27 core2core2 /netbsd: uhub3: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
Jul 27 01:57:27 core2core2 /netbsd: uhub3: 2 ports with 2 removable, self powered
Jul 27 01:57:27 core2core2 /netbsd: ehci0 at pci0 dev 29 function 7: Intel 82801GB/GR USB EHCI Controller (rev. 0x01)
Jul 27 01:57:27 core2core2 /netbsd: ehci0: interrupting at ioapic0 pin 20 (irq 3)
Jul 27 01:57:27 core2core2 /netbsd: ehci0: BIOS has given up ownership
Jul 27 01:57:27 core2core2 /netbsd: ehci0: EHCI version 1.0
Jul 27 01:57:27 core2core2 /netbsd: ehci0: companion controllers, 2 ports each: uhci0 uhci1 uhci2 uhci3
Jul 27 01:57:27 core2core2 /netbsd: usb4 at ehci0: USB revision 2.0
Jul 27 01:57:27 core2core2 /netbsd: uhub4 at usb4
Jul 27 01:57:27 core2core2 /netbsd: uhub4: Intel EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
Jul 27 01:57:27 core2core2 /netbsd: uhub4: single transaction translator
Jul 27 01:57:27 core2core2 /netbsd: uhub4: 8 ports with 8 removable, self powered
Jul 27 01:57:27 core2core2 /netbsd: ppb2 at pci0 dev 30 function 0: Intel 82801BA Hub-PCI Bridge (rev. 0xe1)
Jul 27 01:57:27 core2core2 /netbsd: pci3 at ppb2 bus 1
Jul 27 01:57:27 core2core2 /netbsd: pci3: i/o space, memory space enabled
Jul 27 01:57:27 core2core2 /netbsd: Altera product 0x0003 (undefined subclass 0x00, revision 0x01) at pci3 dev 0 function 0 not configured
Jul 27 01:57:27 core2core2 /netbsd: fxp0 at pci3 dev 1 function 0: i82559 Ethernet, rev 8
Jul 27 01:57:27 core2core2 /netbsd: fxp0: interrupting at ioapic0 pin 21 (irq 5)
Jul 27 01:57:27 core2core2 /netbsd: fxp0: Ethernet address 00:0e:0c:6c:9f:51
Jul 27 01:57:27 core2core2 /netbsd: inphy0 at fxp0 phy 1: i82555 10/100 media interface, rev. 4
Jul 27 01:57:27 core2core2 /netbsd: inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
Jul 27 01:57:27 core2core2 /netbsd: pcib0 at pci0 dev 31 function 0
Jul 27 01:57:27 core2core2 /netbsd: pcib0: Intel 82801GB/GR LPC Interface Bridge (rev. 0x01)
Jul 27 01:57:27 core2core2 /netbsd: piixide0 at pci0 dev 31 function 1
Jul 27 01:57:27 core2core2 /netbsd: piixide0: Intel 82801GB/GR IDE Controller (ICH7) (rev. 0x01)
Jul 27 01:57:27 core2core2 /netbsd: piixide0: bus-master DMA support present
Jul 27 01:57:27 core2core2 /netbsd: piixide0: primary channel configured to compatibility mode
Jul 27 01:57:27 core2core2 /netbsd: piixide0: primary channel interrupting at ioapic0 pin 14 (irq 14)
Jul 27 01:57:27 core2core2 /netbsd: atabus0 at piixide0 channel 0
Jul 27 01:57:27 core2core2 /netbsd: piixide0: secondary channel configured to compatibility mode
Jul 27 01:57:27 core2core2 /netbsd: piixide0: secondary channel interrupting at ioapic0 pin 15 (irq 15)
Jul 27 01:57:27 core2core2 /netbsd: atabus1 at piixide0 channel 1
Jul 27 01:57:27 core2core2 /netbsd: piixide1 at pci0 dev 31 function 2
Jul 27 01:57:27 core2core2 /netbsd: piixide1: Intel 82801GB/GR Serial ATA/Raid Controller (ICH7) (rev. 0x01)
Jul 27 01:57:27 core2core2 /netbsd: piixide1: bus-master DMA support present
Jul 27 01:57:27 core2core2 /netbsd: piixide1: primary channel configured to native-PCI mode
Jul 27 01:57:27 core2core2 /netbsd: piixide1: using ioapic0 pin 23 (irq 5) for native-PCI interrupt
Jul 27 01:57:27 core2core2 /netbsd: atabus2 at piixide1 channel 0
Jul 27 01:57:27 core2core2 /netbsd: piixide1: secondary channel configured to native-PCI mode
Jul 27 01:57:27 core2core2 /netbsd: atabus3 at piixide1 channel 1
Jul 27 01:57:27 core2core2 /netbsd: Intel 82801GB/GR SMBus Controller (SMBus serial bus, revision 0x01) at pci0 dev 31 function 3 not configured
Jul 27 01:57:27 core2core2 /netbsd: isa0 at pcib0
Jul 27 01:57:27 core2core2 /netbsd: pcppi0 at isa0 port 0x61
Jul 27 01:57:27 core2core2 /netbsd: midi0 at pcppi0: PC speaker
Jul 27 01:57:27 core2core2 /netbsd: sysbeep0 at pcppi0
Jul 27 01:57:27 core2core2 /netbsd: isapnp0 at isa0 port 0x279: ISA Plug 'n Play device support
Jul 27 01:57:27 core2core2 /netbsd: isapnp0: no ISA Plug 'n Play devices found
Jul 27 01:57:27 core2core2 /netbsd: ioapic0: enabling
Jul 27 01:57:27 core2core2 /netbsd: azalia0: codec[0]: 0x11d4/0x1986 (rev. 5.0)
Jul 27 01:57:27 core2core2 /netbsd: azalia0: codec[0]: High Definition Audio rev. 1.0
Jul 27 01:57:27 core2core2 /netbsd: azalia0: playback: max channels=6, encodings=1<PCM>
Jul 27 01:57:27 core2core2 /netbsd: azalia0: playback: PCM formats=e007f<24bit,20bit,16bit,48kHz,44.1kHz,32kHz,22.05kHz,16kHz,11.025kHz,8kHz>
Jul 27 01:57:27 core2core2 /netbsd: azalia0: recording: max channels=2, encodings=1<PCM>
Jul 27 01:57:27 core2core2 /netbsd: azalia0: recording: PCM formats=6007f<20bit,16bit,48kHz,44.1kHz,32kHz,22.05kHz,16kHz,11.025kHz,8kHz>
Jul 27 01:57:27 core2core2 /netbsd: audio0 at azalia0: full duplex, independent
Jul 27 01:57:27 core2core2 /netbsd: Kernelized RAIDframe activated
Jul 27 01:57:27 core2core2 /netbsd: wd0 at atabus2 drive 0: <WDC WD2000JS-00MHB0>
Jul 27 01:57:27 core2core2 /netbsd: wd0: drive supports 16-sector PIO transfers, LBA48 addressing
Jul 27 01:57:27 core2core2 /netbsd: wd0: 186 GB, 387621 cyl, 16 head, 63 sec, 512 bytes/sect x 390721968 sectors
Jul 27 01:57:27 core2core2 /netbsd: wd0: 32-bit data port
Jul 27 01:57:27 core2core2 /netbsd: wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133)
Jul 27 01:57:27 core2core2 /netbsd: wd0(piixide1:0:0): using PIO mode 4, Ultra-DMA mode 6 (Ultra/133) (using DMA)
Jul 27 01:57:27 core2core2 /netbsd: boot device: wd0
Jul 27 01:57:27 core2core2 /netbsd: root on wd0a dumps on wd0b
Jul 27 01:57:27 core2core2 /netbsd: root file system type: ffs
Jul 27 01:57:27 core2core2 /netbsd: cpu1: CPU 1 running
Jul 27 01:57:27 core2core2 /netbsd: wsdisplay0: screen 1 added (80x25, vt100 emulation)
Jul 27 01:57:27 core2core2 /netbsd: wsdisplay0: screen 2 added (80x25, vt100 emulation)
Jul 27 01:57:27 core2core2 /netbsd: wsdisplay0: screen 3 added (80x25, vt100 emulation)
Jul 27 01:57:27 core2core2 /netbsd: wsdisplay0: screen 4 added (80x25, vt100 emulation)
Jul 27 01:57:27 core2core2 savecore: no core dump
Jul 27 01:57:29 core2core2 root: /etc/rc: WARNING: sendmail client queue /var/spool/clientmqueue has wrong owner/mode
Jul 27 01:58:44 core2core2 /netbsd:
Jul 27 01:58:44 core2core2 /netbsd: __NetBSD_Version__ = 301000001
Jul 27 01:58:44 core2core2 /netbsd: driver: pci
Jul 27 01:58:44 core2core2 /netbsd: mov0 at pci3
Jul 27 01:58:44 core2core2 /netbsd: : intrstr ioapic0 pin 11 (irq 11) dv_xname mov0
Jul 27 01:58:44 core2core2 /netbsd: Found and attached to a MovMod Device 
>How-To-Repeat:
The problem happens as soon as the lkm is loaded for the device. I would assume the problem would occur with all PCI device lkms, however I only have the lkm for my companies PCI card. 
>Fix:

>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/36727: lkms that work with Single processor kernel do not work with muli-processor kernel
Date: Fri, 3 Aug 2007 11:53:30 +0200

 On Fri, Aug 03, 2007 at 09:45:01AM +0000, ianm@cat.co.za wrote:

 > However the interrupt counts for ioapic0 pin 17 seem to be going wild.

 What interrupt is assigned in the uniprocessor case?

 Martin

From: Ian McIntosh <ianm@cat.co.za>
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org,
	netbsd-bugs@netbsd.org
Subject: Re: kern/36727: lkms that work with Single processor kernel do not
 work with muli-processor kernel
Date: Fri, 03 Aug 2007 13:57:08 +0200

 Martin Husemann wrote:
 > The following reply was made to PR kern/36727; it has been noted by GNATS.
 >
 > From: Martin Husemann <martin@duskware.de>
 > To: gnats-bugs@NetBSD.org
 > Cc: 
 > Subject: Re: kern/36727: lkms that work with Single processor kernel do not work with muli-processor kernel
 > Date: Fri, 3 Aug 2007 11:53:30 +0200
 >
 >  On Fri, Aug 03, 2007 at 09:45:01AM +0000, ianm@cat.co.za wrote:
 >  
 >  > However the interrupt counts for ioapic0 pin 17 seem to be going wild.
 >  
 >  What interrupt is assigned in the uniprocessor case?
 >  
 >  Martin
 >   
 Hi Martin

 irq 10


 Kind Regards,

 Ian McIntosh

From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: ianm@cat.co.za
Subject: Re: kern/36727: lkms that work with Single processor kernel do not work with muli-processor kernel
Date: Fri, 3 Aug 2007 14:45:34 +0200

 On Fri, Aug 03, 2007 at 11:55:04AM +0000, Ian McIntosh wrote:
 >  irq 10

 Doy you have support for ioapic in the UP kernel?
 If not, could you try to add

   ioapic* at mainbus?

 to your kernel config and see how that works?

 If you already have it, could you quote the complete interrupt line from
 the boot message?

 Thanks,

 Martin

From: Ian McIntosh <ianm@cat.co.za>
To: gnats-bugs@NetBSD.org
Cc: Martin Husemann <martin@duskware.de>
Subject: Re: kern/36727: lkms that work with Single processor kernel do not
 work with muli-processor kernel
Date: Fri, 03 Aug 2007 17:13:50 +0200

 Martin Husemann wrote:
 > On Fri, Aug 03, 2007 at 11:55:04AM +0000, Ian McIntosh wrote:
 >   
 >>  irq 10
 >>     
 >
 > Doy you have support for ioapic in the UP kernel?
 > If not, could you try to add
 >
 >   ioapic* at mainbus?
 >
 > to your kernel config and see how that works?
 >
 > If you already have it, could you quote the complete interrupt line from
 > the boot message?
 >
 > Thanks,
 >
 > Martin
 >
 >   
 Hi Martin

 Not sure what you mean by 'UP kernel', could you please explain that. I 
 did compile a GENERIC kernel with
 ioapic* at mainbus?
 options MPBIOS
 options MPBIOS_SCANPCI

 This did not work at all. To me it looks like the lkm is ignoring the 
 ioapic somehow.

 The complete dmesg is as below (mov0 is the PCI card my company produces)

 Ian

 Aug  4 04:05:01 core2core2 /netbsd: 
 root@core2core2:/usr/src/sys/arch/i386/compile/GENERIC
 Aug  4 04:05:01 core2core2 /netbsd: total memory = 503 MB
 Aug  4 04:05:01 core2core2 /netbsd: avail memory = 484 MB
 Aug  4 04:05:01 core2core2 /netbsd: BIOS32 rev. 0 found at 0xf0010
 Aug  4 04:05:01 core2core2 /netbsd: mainbus0 (root)
 Aug  4 04:05:01 core2core2 /netbsd: mainbus0: Intel MP Specification 
 (Version 1.4) (INTEL                )
 Aug  4 04:05:01 core2core2 /netbsd: cpu0 at mainbus0: apid 0 (boot 
 processor)
 Aug  4 04:05:01 core2core2 /netbsd: cpu0: Intel Pentium Pro, II or III 
 (686-class), 1866.72 MHz, id 0x6f2
 Aug  4 04:05:01 core2core2 /netbsd: cpu0: features 
 bfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR>
 Aug  4 04:05:01 core2core2 /netbsd: cpu0: features 
 bfebfbff<PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX>
 Aug  4 04:05:01 core2core2 /netbsd: cpu0: features 
 bfebfbff<FXSR,SSE,SSE2,SS,HTT,TM,SBF>
 Aug  4 04:05:01 core2core2 /netbsd: cpu0: features2 
 e3bd<SSE3,MONITOR,DS-CPL,VMX,EST,TM2,xTPR>
 Aug  4 04:05:01 core2core2 /netbsd: cpu0: "Intel(R) Core(TM)2 
 CPU          6300  @ 1.86GHz"
 Aug  4 04:05:01 core2core2 /netbsd: cpu0: I-cache 32 KB 64B/line 8-way, 
 D-cache 32 KB 64B/line 8-way
 Aug  4 04:05:01 core2core2 /netbsd: cpu0: L2 cache 2 MB 64B/line 8-way
 Aug  4 04:05:01 core2core2 /netbsd: cpu0: using thermal monitor 1
 Aug  4 04:05:01 core2core2 /netbsd: cpu0: Enhanced SpeedStep (1340 mV)  
 - unknown CPU or operating point.
 Aug  4 04:05:01 core2core2 /netbsd: cpu0: calibrating local timer
 Aug  4 04:05:01 core2core2 /netbsd: cpu0: apic clock running at 266 MHz
 Aug  4 04:05:01 core2core2 /netbsd: cpu0: 64 page colors
 Aug  4 04:05:01 core2core2 /netbsd: cpu1 at mainbus0: apid 1 
 (application processor)
 Aug  4 04:05:01 core2core2 /netbsd: cpu1: not started
 Aug  4 04:05:01 core2core2 /netbsd: mpbios: bus 0 is type PCI  
 Aug  4 04:05:01 core2core2 /netbsd: mpbios: bus 1 is type PCI  
 Aug  4 04:05:01 core2core2 /netbsd: mpbios: bus 2 is type PCI  
 Aug  4 04:05:01 core2core2 /netbsd: mpbios: bus 3 is type PCI  
 Aug  4 04:05:01 core2core2 /netbsd: mpbios: bus 4 is type ISA  
 Aug  4 04:05:01 core2core2 /netbsd: ioapic0 at mainbus0 apid 2 (I/O APIC)
 Aug  4 04:05:01 core2core2 /netbsd: ioapic0: pa 0xfec00000, version 20, 
 24 pins
 Aug  4 04:05:01 core2core2 /netbsd: pci0 at mainbus0 bus 0: 
 configuration mode 1
 Aug  4 04:05:01 core2core2 /netbsd: pci0: i/o space, memory space 
 enabled, rd/line, rd/mult, wr/inv ok
 Aug  4 04:05:01 core2core2 /netbsd: pchb0 at pci0 dev 0 function 0
 Aug  4 04:05:01 core2core2 /netbsd: pchb0: Intel 82945G/P Memory 
 Controller Hub (rev. 0x02)
 Aug  4 04:05:01 core2core2 /netbsd: vga1 at pci0 dev 2 function 0: Intel 
 product 0x2772 (rev. 0x02)
 Aug  4 04:05:01 core2core2 /netbsd: wsdisplay0 at vga1 kbdmux 1: console 
 (80x25, vt100 emulation)
 Aug  4 04:05:01 core2core2 /netbsd: wsmux1: connecting to wsdisplay0
 Aug  4 04:05:01 core2core2 /netbsd: azalia0 at pci0 dev 27 function 0: 
 Generic High Definition Audio Controller
 Aug  4 04:05:01 core2core2 /netbsd: azalia0: interrupting at ioapic0 pin 
 19 (irq 5)
 Aug  4 04:05:01 core2core2 /netbsd: azalia0: host: Intel 82801GB/GR High 
 Definition Audio Controller (rev. 1)
 Aug  4 04:05:01 core2core2 /netbsd: azalia0: host: High Definition Audio 
 rev. 1.0
 Aug  4 04:05:01 core2core2 /netbsd: ppb0 at pci0 dev 28 function 0: 
 Intel 82801GB/GR PCI Express Port #1 (rev. 0x01)
 Aug  4 04:05:01 core2core2 /netbsd: pci1 at ppb0 bus 3
 Aug  4 04:05:01 core2core2 /netbsd: pci1: i/o space, memory space 
 enabled, rd/line, wr/inv ok
 Aug  4 04:05:01 core2core2 /netbsd: ppb1 at pci0 dev 28 function 1: 
 Intel 82801GB/GR PCI Express Port #2 (rev. 0x01)
 Aug  4 04:05:01 core2core2 /netbsd: pci2 at ppb1 bus 2
 Aug  4 04:05:01 core2core2 /netbsd: pci2: i/o space, memory space 
 enabled, rd/line, wr/inv ok
 Aug  4 04:05:01 core2core2 /netbsd: unknown vendor 0x1969 product 0x1048 
 (ethernet network, revision 0xb0) at pci2 dev 0 function 0 not configured
 Aug  4 04:05:01 core2core2 /netbsd: uhci0 at pci0 dev 29 function 0: 
 Intel 82801GB/GR USB UHCI Controller (rev. 0x01)
 Aug  4 04:05:01 core2core2 /netbsd: uhci0: interrupting at ioapic0 pin 
 20 (irq 3)
 Aug  4 04:05:01 core2core2 /netbsd: usb0 at uhci0: USB revision 1.0
 Aug  4 04:05:01 core2core2 /netbsd: uhub0 at usb0
 Aug  4 04:05:01 core2core2 /netbsd: uhub0: Intel UHCI root hub, class 
 9/0, rev 1.00/1.00, addr 1
 Aug  4 04:05:01 core2core2 /netbsd: uhub0: 2 ports with 2 removable, 
 self powered
 Aug  4 04:05:01 core2core2 /netbsd: uhci1 at pci0 dev 29 function 1: 
 Intel 82801GB/GR USB UHCI Controller (rev. 0x01)
 Aug  4 04:05:01 core2core2 /netbsd: uhci1: interrupting at ioapic0 pin 
 17 (irq 10)
 Aug  4 04:05:01 core2core2 /netbsd: usb1 at uhci1: USB revision 1.0
 Aug  4 04:05:01 core2core2 /netbsd: uhub1 at usb1
 Aug  4 04:05:01 core2core2 /netbsd: uhub1: Intel UHCI root hub, class 
 9/0, rev 1.00/1.00, addr 1
 Aug  4 04:05:01 core2core2 /netbsd: uhub1: 2 ports with 2 removable, 
 self powered
 Aug  4 04:05:01 core2core2 /netbsd: uhci2 at pci0 dev 29 function 2: 
 Intel 82801GB/GR USB UHCI Controller (rev. 0x01)
 Aug  4 04:05:01 core2core2 /netbsd: uhci2: interrupting at ioapic0 pin 
 18 (irq 10)
 Aug  4 04:05:01 core2core2 /netbsd: usb2 at uhci2: USB revision 1.0
 Aug  4 04:05:01 core2core2 /netbsd: uhub2 at usb2
 Aug  4 04:05:01 core2core2 /netbsd: uhub2: Intel UHCI root hub, class 
 9/0, rev 1.00/1.00, addr 1
 Aug  4 04:05:01 core2core2 /netbsd: uhub2: 2 ports with 2 removable, 
 self powered
 Aug  4 04:05:01 core2core2 /netbsd: uhci3 at pci0 dev 29 function 3: 
 Intel 82801GB/GR USB UHCI Controller (rev. 0x01)
 Aug  4 04:05:01 core2core2 /netbsd: uhci3: interrupting at ioapic0 pin 
 19 (irq 5)
 Aug  4 04:05:01 core2core2 /netbsd: usb3 at uhci3: USB revision 1.0
 Aug  4 04:05:01 core2core2 /netbsd: uhub3 at usb3
 Aug  4 04:05:01 core2core2 /netbsd: uhub3: Intel UHCI root hub, class 
 9/0, rev 1.00/1.00, addr 1
 Aug  4 04:05:01 core2core2 /netbsd: uhub3: 2 ports with 2 removable, 
 self powered
 Aug  4 04:05:01 core2core2 /netbsd: ehci0 at pci0 dev 29 function 7: 
 Intel 82801GB/GR USB EHCI Controller (rev. 0x01)
 Aug  4 04:05:01 core2core2 /netbsd: ehci0: interrupting at ioapic0 pin 
 20 (irq 3)
 Aug  4 04:05:01 core2core2 /netbsd: ehci0: BIOS has given up ownership
 Aug  4 04:05:01 core2core2 /netbsd: ehci0: EHCI version 1.0
 Aug  4 04:05:01 core2core2 /netbsd: ehci0: companion controllers, 2 
 ports each: uhci0 uhci1 uhci2 uhci3
 Aug  4 04:05:01 core2core2 /netbsd: usb4 at ehci0: USB revision 2.0
 Aug  4 04:05:01 core2core2 /netbsd: uhub4 at usb4
 Aug  4 04:05:01 core2core2 /netbsd: uhub4: Intel EHCI root hub, class 
 9/0, rev 2.00/1.00, addr 1
 Aug  4 04:05:01 core2core2 /netbsd: uhub4: single transaction translator
 Aug  4 04:05:01 core2core2 /netbsd: uhub4: 8 ports with 8 removable, 
 self powered
 Aug  4 04:05:01 core2core2 /netbsd: ppb2 at pci0 dev 30 function 0: 
 Intel 82801BA Hub-PCI Bridge (rev. 0xe1)
 Aug  4 04:05:01 core2core2 /netbsd: pci3 at ppb2 bus 1
 Aug  4 04:05:01 core2core2 /netbsd: pci3: i/o space, memory space enabled
 Aug  4 04:05:01 core2core2 /netbsd: Altera product 0x0003 (undefined 
 subclass 0x00, revision 0x01) at pci3 dev 0 function 0 not configured
 Aug  4 04:05:01 core2core2 /netbsd: fxp0 at pci3 dev 1 function 0: 
 i82559 Ethernet, rev 8
 Aug  4 04:05:01 core2core2 /netbsd: fxp0: interrupting at ioapic0 pin 21 
 (irq 5)
 Aug  4 04:05:01 core2core2 /netbsd: fxp0: Ethernet address 00:0e:0c:6c:9f:51
 Aug  4 04:05:01 core2core2 /netbsd: inphy0 at fxp0 phy 1: i82555 10/100 
 media interface, rev. 4
 Aug  4 04:05:01 core2core2 /netbsd: inphy0: 10baseT, 10baseT-FDX, 
 100baseTX, 100baseTX-FDX, auto
 Aug  4 04:05:01 core2core2 /netbsd: pcib0 at pci0 dev 31 function 0
 Aug  4 04:05:01 core2core2 /netbsd: pcib0: Intel 82801GB/GR LPC 
 Interface Bridge (rev. 0x01)
 Aug  4 04:05:01 core2core2 /netbsd: piixide0 at pci0 dev 31 function 1
 Aug  4 04:05:01 core2core2 /netbsd: piixide0: Intel 82801GB/GR IDE 
 Controller (ICH7) (rev. 0x01)
 Aug  4 04:05:01 core2core2 /netbsd: piixide0: bus-master DMA support present
 Aug  4 04:05:01 core2core2 /netbsd: piixide0: primary channel configured 
 to compatibility mode
 Aug  4 04:05:01 core2core2 /netbsd: piixide0: primary channel 
 interrupting at ioapic0 pin 14 (irq 14)
 Aug  4 04:05:01 core2core2 /netbsd: atabus0 at piixide0 channel 0
 Aug  4 04:05:01 core2core2 /netbsd: piixide0: secondary channel 
 configured to compatibility mode
 Aug  4 04:05:01 core2core2 /netbsd: piixide0: secondary channel 
 interrupting at ioapic0 pin 15 (irq 15)
 Aug  4 04:05:01 core2core2 /netbsd: atabus1 at piixide0 channel 1
 Aug  4 04:05:01 core2core2 /netbsd: piixide1 at pci0 dev 31 function 2
 Aug  4 04:05:01 core2core2 /netbsd: piixide1: Intel 82801GB/GR Serial 
 ATA/Raid Controller (ICH7) (rev. 0x01)
 Aug  4 04:05:01 core2core2 /netbsd: piixide1: bus-master DMA support present
 Aug  4 04:05:01 core2core2 /netbsd: piixide1: primary channel configured 
 to native-PCI mode
 Aug  4 04:05:01 core2core2 /netbsd: piixide1: using ioapic0 pin 23 (irq 
 5) for native-PCI interrupt
 Aug  4 04:05:01 core2core2 /netbsd: atabus2 at piixide1 channel 0
 Aug  4 04:05:01 core2core2 /netbsd: piixide1: secondary channel 
 configured to native-PCI mode
 Aug  4 04:05:01 core2core2 /netbsd: atabus3 at piixide1 channel 1
 Aug  4 04:05:01 core2core2 /netbsd: Intel 82801GB/GR SMBus Controller 
 (SMBus serial bus, revision 0x01) at pci0 dev 31 function 3 not configured
 Aug  4 04:05:01 core2core2 /netbsd: isa0 at pcib0
 Aug  4 04:05:01 core2core2 /netbsd: lpt0 at isa0 port 0x378-0x37b irq 7
 Aug  4 04:05:01 core2core2 /netbsd: com0 at isa0 port 0x3f8-0x3ff irq 4: 
 ns16550a, working fifo
 Aug  4 04:05:01 core2core2 /netbsd: com0: kgdb
 Aug  4 04:05:01 core2core2 /netbsd: pckbc0 at isa0 port 0x60-0x64
 Aug  4 04:05:01 core2core2 /netbsd: pckbd0 at pckbc0 (kbd slot)
 Aug  4 04:05:01 core2core2 /netbsd: pckbc0: using irq 1 for kbd slot
 Aug  4 04:05:01 core2core2 /netbsd: wskbd0 at pckbd0: console keyboard, 
 using wsdisplay0
 Aug  4 04:05:01 core2core2 /netbsd: pms0 at pckbc0 (aux slot)
 Aug  4 04:05:01 core2core2 /netbsd: pckbc0: using irq 12 for aux slot
 Aug  4 04:05:01 core2core2 /netbsd: wsmouse0 at pms0 mux 0
 Aug  4 04:05:01 core2core2 /netbsd: pcppi0 at isa0 port 0x61
 Aug  4 04:05:01 core2core2 /netbsd: midi0 at pcppi0: PC speaker
 Aug  4 04:05:01 core2core2 /netbsd: sysbeep0 at pcppi0
 Aug  4 04:05:01 core2core2 /netbsd: isapnp0 at isa0 port 0x279: ISA Plug 
 'n Play device support
 Aug  4 04:05:01 core2core2 /netbsd: npx0 at isa0 port 0xf0-0xffnpx0: 
 reported by CPUID; using exception 16
 Aug  4 04:05:01 core2core2 /netbsd: fdc0 at isa0 port 0x3f0-0x3f7 irq 6 
 drq 2
 Aug  4 04:05:01 core2core2 /netbsd: isapnp0: no ISA Plug 'n Play devices 
 found
 Aug  4 04:05:01 core2core2 /netbsd: ioapic0: enabling
 Aug  4 04:05:01 core2core2 /netbsd: azalia0: codec[0]: 0x11d4/0x1986 
 (rev. 5.0)
 Aug  4 04:05:01 core2core2 /netbsd: azalia0: codec[0]: High Definition 
 Audio rev. 1.0
 Aug  4 04:05:01 core2core2 /netbsd: azalia0: playback: max channels=6, 
 encodings=1<PCM>
 Aug  4 04:05:01 core2core2 /netbsd: azalia0: playback: PCM 
 formats=e007f<24bit,20bit,16bit,48kHz,44.1kHz,32kHz,22.05kHz,16kHz,11.025kHz,8kHz>
 Aug  4 04:05:01 core2core2 /netbsd: azalia0: recording: max channels=2, 
 encodings=1<PCM>
 Aug  4 04:05:01 core2core2 /netbsd: azalia0: recording: PCM 
 formats=6007f<20bit,16bit,48kHz,44.1kHz,32kHz,22.05kHz,16kHz,11.025kHz,8kHz>
 Aug  4 04:05:01 core2core2 /netbsd: audio0 at azalia0: full duplex, 
 independent
 Aug  4 04:05:01 core2core2 /netbsd: Kernelized RAIDframe activated
 Aug  4 04:05:01 core2core2 /netbsd: wd0 at atabus2 drive 0: <WDC 
 WD2000JS-00MHB0>
 Aug  4 04:05:01 core2core2 /netbsd: wd0: drive supports 16-sector PIO 
 transfers, LBA48 addressing
 Aug  4 04:05:01 core2core2 /netbsd: wd0: 186 GB, 387621 cyl, 16 head, 63 
 sec, 512 bytes/sect x 390721968 sectors
 Aug  4 04:05:01 core2core2 /netbsd: wd0: 32-bit data port
 Aug  4 04:05:01 core2core2 /netbsd: wd0: drive supports PIO mode 4, DMA 
 mode 2, Ultra-DMA mode 6 (Ultra/133)
 Aug  4 04:05:01 core2core2 /netbsd: wd0(piixide1:0:0): using PIO mode 4, 
 Ultra-DMA mode 6 (Ultra/133) (using DMA)
 Aug  4 04:05:01 core2core2 /netbsd: boot device: wd0
 Aug  4 04:05:01 core2core2 /netbsd: root on wd0a dumps on wd0b
 Aug  4 04:05:01 core2core2 /netbsd: root file system type: ffs
 Aug  4 04:05:01 core2core2 /netbsd: wsdisplay0: screen 1 added (80x25, 
 vt100 emulation)
 Aug  4 04:05:01 core2core2 /netbsd: wsdisplay0: screen 2 added (80x25, 
 vt100 emulation)
 Aug  4 04:05:01 core2core2 /netbsd: wsdisplay0: screen 3 added (80x25, 
 vt100 emulation)
 Aug  4 04:05:01 core2core2 /netbsd: wsdisplay0: screen 4 added (80x25, 
 vt100 emulation)
 Aug  4 04:05:01 core2core2 savecore: reboot after panic: panic: trap
 Aug  4 04:05:01 core2core2 savecore: writing compressed core to 
 /var/crash/netbsd.7.core.gz
 Aug  4 04:05:33 core2core2 savecore: writing compressed kernel to 
 /var/crash/netbsd.7.gz
 Aug  4 04:05:36 core2core2 root: /etc/rc: WARNING: sendmail client queue 
 /var/spool/clientmqueue has wrong owner/mode
 Aug  4 04:06:06 core2core2 /netbsd:
 Aug  4 04:06:06 core2core2 /netbsd: __NetBSD_Version__ = 301000001
 Aug  4 04:06:06 core2core2 /netbsd: driver: pci
 Aug  4 04:06:06 core2core2 /netbsd: mov0 at pci3
 Aug  4 04:06:06 core2core2 /netbsd: pci_intr_map: bus 1 dev 0 func 0 pin 
 1; line 10
 Aug  4 04:06:06 core2core2 /netbsd: pci_intr_map: no MP mapping found
 Aug  4 04:06:06 core2core2 /netbsd: failed to allocate interrupt slot 
 for PIC pic0 pin 10
 Aug  4 04:06:06 core2core2 /netbsd: : couldn't establish interrupt at irq 10
 Aug  4 04:07:33 core2core2 syslogd: Exiting on signal 15
 Aug  4 04:09:05 core2core2 syslogd: restart

From: Martin Husemann <martin@duskware.de>
To: Ian McIntosh <ianm@cat.co.za>
Cc: gnats-bugs@NetBSD.org
Subject: Re: kern/36727: lkms that work with Single processor kernel do not work with muli-processor kernel
Date: Fri, 3 Aug 2007 17:17:05 +0200

 On Fri, Aug 03, 2007 at 05:13:50PM +0200, Ian McIntosh wrote:
 > Not sure what you mean by 'UP kernel', could you please explain that. I 
 > did compile a GENERIC kernel with
 > ioapic* at mainbus?
 > options MPBIOS
 > options MPBIOS_SCANPCI

 That is what I meant (UP = uniprocessor, i.e. not having options MULTIPROCESSOR)

 > This did not work at all. To me it looks like the lkm is ignoring the 
 > ioapic somehow.

 So there we are: the problem is not a MULTIPROCESSOR kernel vs. a uniprocessor
 one, but interrupts via ioapic not working.

 I would have expected something like:
 > uhci1: interrupting at ioapic0 pin 17 (irq 10)
 > uhci2: interrupting at ioapic0 pin 18 (irq 10)

 for your module too, but it just fails:

 > mov0 at pci3
 > pci_intr_map: bus 1 dev 0 func 0 pin 1; line 10
 > pci_intr_map: no MP mapping found
 > failed to allocate interrupt slot for PIC pic0 pin 10
 > : couldn't establish interrupt at irq 10

 "PIC pic0" sounds wrong here - it should be ioapic0.

 Martin

From: Ian McIntosh <ianm@cat.co.za>
To: Martin Husemann <martin@duskware.de>
Cc: gnats-bugs@NetBSD.org
Subject: Re: kern/36727: lkms that work with Single processor kernel do not
 work with muli-processor kernel
Date: Fri, 03 Aug 2007 17:35:24 +0200

 Martin Husemann wrote:
 > That is what I meant (UP = uniprocessor, i.e. not having options MULTIPROCESSOR)
 >
 >   
 Okay good, I understood correctly then
 >> This did not work at all. To me it looks like the lkm is ignoring the 
 >> ioapic somehow.
 >>     
 >
 > So there we are: the problem is not a MULTIPROCESSOR kernel vs. a uniprocessor
 > one, but interrupts via ioapic not working.
 >
 >   
 So it seems I have incorrectly labelled the problem - I apologise for 
 the mistake
 > I would have expected something like:
 >   
 >> uhci1: interrupting at ioapic0 pin 17 (irq 10)
 >> uhci2: interrupting at ioapic0 pin 18 (irq 10)
 >>     
 >
 > for your module too, but it just fails:
 >
 >   
 >> mov0 at pci3
 >> pci_intr_map: bus 1 dev 0 func 0 pin 1; line 10
 >> pci_intr_map: no MP mapping found
 >> failed to allocate interrupt slot for PIC pic0 pin 10
 >> : couldn't establish interrupt at irq 10
 >>     
 >
 > "PIC pic0" sounds wrong here - it should be ioapic0.
 >
 >   
 So how do we resolve this problem - do you have any suggestions? or is 
 this a known issue that is already being worked on.

 Ian

From: Martin Husemann <martin@duskware.de>
To: Ian McIntosh <ianm@cat.co.za>
Cc: gnats-bugs@NetBSD.org
Subject: Re: kern/36727: lkms that work with Single processor kernel do not work with muli-processor kernel
Date: Fri, 3 Aug 2007 17:41:13 +0200

 On Fri, Aug 03, 2007 at 05:35:24PM +0200, Ian McIntosh wrote:
 > So how do we resolve this problem - do you have any suggestions? or is 
 > this a known issue that is already being worked on.

 Could you modify your lkm to print the pci_intr_handle_t token
 passed to pci_intr_establish as a hex value?

 It is supposed to have 0x10000000 set (see sys/arch/x86/include/i82093var.h
 defining APIC_INT_VIA_APIC and APIC_IRQ_APIC)

 Martin

From: Ian McIntosh <ianm@cat.co.za>
To: gnats-bugs@NetBSD.org
Cc: Martin Husemann <martin@duskware.de>
Subject: Re: kern/36727: lkms that work with Single processor kernel do not
 work with muli-processor kernel
Date: Fri, 03 Aug 2007 18:08:57 +0200

 >  
 >  Could you modify your lkm to print the pci_intr_handle_t token
 >  passed to pci_intr_establish as a hex value?
 >  
 >  It is supposed to have 0x10000000 set (see sys/arch/x86/include/i82093var.h
 >  defining APIC_INT_VIA_APIC and APIC_IRQ_APIC)
 >  
 >   
 pci_intr_handle_t = 0xa

 Ian

From: Martin Husemann <martin@duskware.de>
To: Ian McIntosh <ianm@cat.co.za>
Cc: gnats-bugs@NetBSD.org
Subject: Re: kern/36727: lkms that work with Single processor kernel do not work with muli-processor kernel
Date: Fri, 3 Aug 2007 18:10:50 +0200

 On Fri, Aug 03, 2007 at 06:08:57PM +0200, Ian McIntosh wrote:
 > pci_intr_handle_t = 0xa

 That is clearly wrong - we need to find out where this wrong value comes
 from. Maybe some NIOAPIC test in a header file somewhere, could you try
 defining NIOAPIC=1 when compiling your lkm?

 Martin

From: Ian McIntosh <ianm@cat.co.za>
To: Martin Husemann <martin@duskware.de>
Cc: gnats-bugs@NetBSD.org
Subject: Re: kern/36727: lkms that work with Single processor kernel do not
 work with muli-processor kernel
Date: Fri, 03 Aug 2007 18:36:07 +0200

 > That is clearly wrong - we need to find out where this wrong value comes
 > from. Maybe some NIOAPIC test in a header file somewhere, could you try
 > defining NIOAPIC=1 when compiling your lkm?
 >
 >   
 Tried that with no change. The way I did this was to add the line 
 #define NIOAPIC 1 in the header file of my lkm. I assume that is correct.
 Messages are:

 __NetBSD_Version__ = 301000001
 driver: pci
 mov0 at pci3
 pci_intr_map: bus 1 dev 0 func 0 pin 1; line 10
 pci_intr_map: no MP mapping found
 pci_intr_handle_t = 0xa
 failed to allocate interrupt slot for PIC pic0 pin 10
 : couldn't establish interrupt at irq 10

 Ian

From: Ian McIntosh <ianm@cat.co.za>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/36727: lkms that work with Single processor kernel do not
 work with muli-processor kernel
Date: Thu, 23 Aug 2007 11:16:47 +0200

 Martin Husemann wrote:
 > The following reply was made to PR kern/36727; it has been noted by GNATS.
 >
 > From: Martin Husemann <martin@duskware.de>
 > To: Ian McIntosh <ianm@cat.co.za>
 > Cc: gnats-bugs@NetBSD.org
 > Subject: Re: kern/36727: lkms that work with Single processor kernel do not work with muli-processor kernel
 > Date: Fri, 3 Aug 2007 18:10:50 +0200
 >
 >  On Fri, Aug 03, 2007 at 06:08:57PM +0200, Ian McIntosh wrote:
 >  > pci_intr_handle_t = 0xa
 >  
 >  That is clearly wrong - we need to find out where this wrong value comes
 >  from. Maybe some NIOAPIC test in a header file somewhere, could you try
 >  defining NIOAPIC=1 when compiling your lkm?
 >  
 >  Martin
 >  
 >   
 Explicitly defining NIOAPIC did not seem to make a difference here so I 
 tried another approach.
 I have got a netBSD 4 system up and running and have managed to get my 
 lkms to compile. This build seems to show very similar behaviour to what 
 I was seeing the netBSD 3 and APIC. The kernel looks to run through the 
 attach and match for our pci card correctly and even looks to assign an 
 interrupt pin (: ioapic0 pin 9 (irq 9) ). However I still see very high 
 interrupt load through vmstat. Furthermore it looks as though ioapic0 
 pin 9 is unassigned when looking at vmstat. Is there anything else I can 
 try?

 vmstat - i:
 interrupt                                     total     rate
 cpu0 softclock                               311337       99
 cpu0 softnet                                   3108        0
 cpu0 timer                                   311350       99
 cpu0 FPU synch IPI                                8        0
 cpu0 TLB shootdown IPI                          713        0
 cpu1 softnet                                     17        0
 cpu1 timer                                   311245       99
 cpu1 FPU synch IPI                               18        0
 cpu1 TLB shootdown IPI                         1668        0
 cpu1 MTRR update IPI                             23        0
 ioapic0 pin 1                                   651        0
 ioapic0 pin 12                                17756        5
 ioapic0 pin 16                                    8        0
 ioapic0 pin 19                               100245       31
 ioapic0 pin 18                            102954470    32777
 ioapic0 pin 21                                 3445        1
 ioapic0 pin 14                                    5        0
 Total                                     104016067    33115

 Kind Regards,
 Ian

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.