From owner-freebsd-smp Fri Dec 11 05:54:25 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id FAA08360 for freebsd-smp-outgoing; Fri, 11 Dec 1998 05:54:25 -0800 (PST) (envelope-from owner-freebsd-smp@FreeBSD.ORG) Received: from fleming.cs.strath.ac.uk (fleming.cs.strath.ac.uk [130.159.196.126]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id FAA08352; Fri, 11 Dec 1998 05:54:11 -0800 (PST) (envelope-from roger@cs.strath.ac.uk) Received: from muir-10 (roger@muir-10.cs.strath.ac.uk [130.159.148.10]) by fleming.cs.strath.ac.uk (8.8.8/8.8.8) with SMTP id NAA00993 Fri, 11 Dec 1998 13:53:27 GMT Message-ID: <367123D9.41C6@cs.strath.ac.uk> Date: Fri, 11 Dec 1998 13:53:30 +0000 From: Roger Hardiman Organization: University of Strathclyde X-Mailer: Mozilla 3.04Gold (X11; I; OSF1 V4.0 alpha) MIME-Version: 1.0 To: splite , Nate Williams CC: mobile@FreeBSD.ORG, smp@FreeBSD.ORG Subject: Re: SMP and PCMCIA card controllers give kernel panic References: <3670045D.2781@cs.strath.ac.uk> <19981210134824.A3259@cynix.ecn.purdue.edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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. So, I got around the crash by hacking the build_freelist() function to only scan from IRQ 1 to 7 and to ignore the rest. I also added my hack which prevents the controller allocating itself a IRQ too, but commenting some other code. So, it all seems to work. PCCARDD detects the two PCMCIA modems and gives me SIO2 and SIO3. I plugged in my two phones and dialed from one to the other and it all worked just great. So, the proper fix is for the build_freelist to be changed to probe correctly under SMP. Who do we need to hastle in the SMP development team. Bye Roger To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message