Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 02 Jul 1997 10:29:21 -0600
From:      Steve Passe <smp@csn.net>
To:        Lars Fredriksen <lars@fredriks-1.pr.mcs.net>
Cc:        smp@freebsd.org
Subject:   Re: Recent (last two days) smp kernel is hanging for me 
Message-ID:  <199707021629.KAA26607@Ilsa.StevesCafe.com>
In-Reply-To: Your message of "Wed, 02 Jul 1997 10:52:41 CDT." <199707021552.KAA18455@fredriks-1.pr.mcs.net> 

next in thread | previous in thread | raw e-mail | index | archive | help
Lars,

> Steve Passe writes:
> > Lars,
> > 
> > > 	Does irq 15 get any kind of special handling under the SMP kernel
> > > ? (ie. does the APIC_IO cause irq 15 to be chained similar to 2/9 under 
> > > isa??)
> > > 
> > > 	The reason I am asking is that my sound card doesn't work with the
> > > 	SMP kernel. I will be trying to validate that there isn't something
> > > 	general about the current tree that is causing this later on today.
> > 
> > its (mostly) a MB design issue.  IRQ15 is usually required for the 2nd
> > onboard IDE controller.  Some designs allow you to use it for other purposes,
> > some don't.  I haven't played with this much, but I suspect that if the
> > hardware works for the UP kewrnel it should be able to be used with SMP.
> > but it might need additional code (although no idea exactly what).
> > track it down a little more and send me the clues...
> > 
> 
> So far all I have is this:
> 
> 	vmstat -i:
> 
> interrupt      total      rate
> clk0 irq0    15801846      100
> rtc0 irq8    20224890      127
> pci irq17       41574        0
> pci irq18     1358259        8
> pci irq19      291042        1
> sc0 irq1       138600        0
> sio0 irq4     4218518       26
> sio1 irq3          12        0
> psm0 irq12     117738        0
> Total        42192479      267
> 
> 
> dmesg says:
> 
> Checking for GUS Plug-n-Play ...
> Board Vendor ID: GRV0001     Board Serial Number: 00004e88
> gus0 at 0x220 irq 15 drq 5 flags 0x7 on isa
>  at 0x32c dma 7,5
>  at 0x220 irq 15 dma 5,7
> 
> Freeing (NOT implemented) redirected ISA irq 15.

OK, I think I see the problem, from your mptable:

I/O Ints:	Type	Polarity    Trigger	Bus ID	 IRQ	APIC ID	INT#
		INT	 conforms    conforms	     1	  15	      2	  20
                                                          ^^              ^^

this is because of the 'special' handling of the 2nd IDE I mentioned earlier.
I don't have time for the whole story now, it involves the PIIX3 design among
other things.

Bottom line is that the 2nd IDE uses ISA INT 15, APIC INT 20.  BUT the ISA bus
itself DOES NOT redirect IRQ15, so this mptable entry is ONLY relevant
to the 2nd IDE controller!  So I would describe the problem as a "deficiency"
in the mptable specification and/or board design.  I'm sure that I can figure
a way to code around the problem, but for now another patch will get you going:

----------------------------------- cut --------------------------------------
i386/i386/mp_machdep.c:

/*
 * Given a traditional ISA INT mask, return an APIC mask.
 */
u_int
isa_apic_mask(u_int isa_mask)
{
	int isa_irq;
	int apic_pin;

+ #if defined(SKIP_IRQ15_REDIRECT)
+ 	if (isa_mask == (1 << 15)) {
+ 		printf("skipping ISA IRQ15 redirect\n");
+ 		return isa_mask;
+ 	}
+ #endif  /* SKIP_IRQ15_REDIRECT */
----------------------------------- cut --------------------------------------

remember to define SKIP_IRQ15_REDIRECT somewhere.  let me know how it works.

--
Steve Passe	| powered by
smp@csn.net	|            Symmetric MultiProcessor FreeBSD





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199707021629.KAA26607>