From owner-freebsd-smp Fri Dec 11 10:43:36 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA10108 for freebsd-smp-outgoing; Fri, 11 Dec 1998 10:43:36 -0800 (PST) (envelope-from owner-freebsd-smp@FreeBSD.ORG) Received: from Ilsa.StevesCafe.com (Ilsa.StevesCafe.com [205.168.119.129]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA10098; Fri, 11 Dec 1998 10:43:29 -0800 (PST) (envelope-from fbsd@Ilsa.StevesCafe.com) Received: from Ilsa.StevesCafe.com (localhost.StevesCafe.com [127.0.0.1]) by Ilsa.StevesCafe.com (8.8.8/8.8.5) with ESMTP id LAA03619; Fri, 11 Dec 1998 11:47:21 -0700 (MST) Message-Id: <199812111847.LAA03619@Ilsa.StevesCafe.com> X-Mailer: exmh version 2.0.2 2/24/98 From: Steve Passe To: Roger Hardiman cc: splite , Nate Williams , mobile@FreeBSD.ORG, smp@FreeBSD.ORG Subject: Re: SMP and PCMCIA card controllers give kernel panic In-reply-to: Your message of "Fri, 11 Dec 1998 13:53:30 GMT." <367123D9.41C6@cs.strath.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 11 Dec 1998 11:47:21 -0700 Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi, > Hi, > > Well I did some kernel hacking and tracked down the problem to the > IRQ probe code. The error is in build_freelist() in /sys/pccard/pcic.c > > It tries to ask the kernel which IRQs are free to be > allocated to A) the PCMCIA controller board and B) the PCMCIA cards. > > This probe does not work correctly with SMP systems. > It seems that on my hardware, the kernel Frees up some IRQs, giving > these messages in my boot sequence. > Freeing (NOT implemented) redirected ISA irq 11. > Freeing (NOT implemented) redirected ISA irq 10. > Freeing (NOT implemented) redirected ISA irq 9. > Freeing (NOT implemented) redirected ISA irq 11. > > The IRQ probe scans IRQs from 1 to 15. > When it gets to IRQ9 it causes a kernel panic, reporting a clash > in the IRQ allocation. (I did not capture the exact error). > > Now IRQs 9,10 and 11 are what my BIOS assignes to my PCI cards and > the SMP kernel does reasign these to IRQs 16 onwards in the magical > APIC_IO way. Need more detailed error messages from your failure. The line: Freeing (NOT implemented) redirected ISA irq 9. ^^^^^^^^^^^^^^^ implies that the SMP kernel did direct IRQ9 thru the APIC. The "NOT implimented" part is a reminder that the ISA section has not been reprogrammed to allow use of IRQ 9 by cards on the ISA bus. (didn't) have time to figure out how when I wrote that code...). So the problem is in this code: /* See if the IRQ is free. */ if (register_intr(irq, 0, 0, nullfunc, NULL, irq) == 0) { /* Give it back, but add it to the mask */ INTRMASK(freemask, mask); unregister_intr(irq, nullfunc); } Since the SMP kernel actually registered an INT from 16 up, but didn't unhook IRQ9 from the bus, nor register it, it looks like its free, when it really isn't. Its been a long time since I was in this code, so I'm not sure of what the cure should be. Would be nice if someone could find time to impliment the "freeing of ISA INT paths" for this situation, but I don't think this would fix this problem. It appears (need the exact error message!) that it is a programmed panic, based on some perceived allocation problem, but I have no idea where without seeing the error message. (note that I used an older SNAP for source to discuss this issue, could be the panic is coming from the current version of this function, but that I am not up to date.) -- Steve Passe | powered by smp@csn.net | Symmetric MultiProcessor FreeBSD To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message