Re: powerpc/pic/intr.c IPL_HIGH vs IPL_NONE

KIYOHARA Takashi <[email protected]> Mon, 07 Jan 2013 20:17:20 +0900 (JST)
Newsgroups gmane.os.netbsd.current,gmane.os.netbsd.ports.powerpc,gmane.os.netbsd.ports.bebox
Message-ID <[email protected]>
----Next_Part(Mon_Jan__7_20_17_20_2013_794)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi! Frank,


From: Frank Wille <[email protected]>
Date: Fri, 4 Jan 2013 11:44:17 +0100

> So the interrupt for a cascaded PIC should always be established with
> IPL_HIGH instead of IPL_NONE?
> 
> We would have to change that in a few locations:
> 
> bebox/bebox/machdep.c:  intr_establish(16 + 26, IST_LEVEL, IPL_NONE, pic_handle_intr, isa_pic);
> evbppc/ev64260/gt_mainbus.c:    intr_establish(IRQ_GPP7_0, IST_LEVEL, IPL_NONE,
> evbppc/ev64260/gt_mainbus.c:    intr_establish(IRQ_GPP15_8, IST_LEVEL, IPL_NONE,
> evbppc/ev64260/gt_mainbus.c:    intr_establish(IRQ_GPP23_16, IST_LEVEL, IPL_NONE,
> evbppc/ev64260/gt_mainbus.c:    intr_establish(IRQ_GPP31_24, IST_LEVEL, IPL_NONE,
> macppc/macppc/pic_ohare.c:      intr_establish(irq, IST_LEVEL, IPL_NONE, pic_handle_intr, pic);
> ofppc/ofppc/mainbus.c:          intr_establish(16, IST_LEVEL, IPL_NONE, pic_handle_intr,
> powerpc/ibm4xx/pic_uic.c:       intr_establish(30, IST_LEVEL, IPL_NONE, pic_handle_intr, &pic_uic1);
> powerpc/ibm4xx/pic_uic.c:       intr_establish(28, IST_LEVEL, IPL_NONE, pic_handle_intr, &pic_uic2);
> prep/prep/machdep.c:            intr_establish(16, IST_LEVEL, IPL_NONE, pic_handle_intr,
> sandpoint/sandpoint/machdep.c:  intr_establish(16, IST_LEVEL, IPL_NONE, pic_handle_intr, isa_pic);
> 
> @kiyohara: Did you already verify that it works for BeBox?

I tested with attached patch.  It is OK.

Thanks,
--
kiyohara

----Next_Part(Mon_Jan__7_20_17_20_2013_794)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename=diff

Index: machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/bebox/bebox/machdep.c,v
retrieving revision 1.106
diff -u -r1.106 machdep.c
--- machdep.c	13 Oct 2012 17:58:54 -0000	1.106
+++ machdep.c	7 Jan 2013 11:11:17 -0000
@@ -164,7 +164,7 @@
 	/*
 	 * set up i8259 as a cascade on BeInterruptController irq 26.
 	 */
-	intr_establish(16 + 26, IST_LEVEL, IPL_NONE, pic_handle_intr, isa_pic);
+	intr_establish(16 + 26, IST_LEVEL, IPL_HIGH, pic_handle_intr, isa_pic);
 
 	oea_install_extint(pic_ext_intr);
 

----Next_Part(Mon_Jan__7_20_17_20_2013_794)----