Subject: Re: kern/36727: lkms that work with Single processor kernel do not
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Ian McIntosh <ianm@cat.co.za>
List: netbsd-bugs
Date: 08/23/2007 09:15:04
The following reply was made to PR kern/36727; it has been noted by GNATS.

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