Subject: Interrupt level in system call
To: None <port-sh3@NetBSD.org>
From: Masao Uebayashi <uebayasi@brains.co.jp>
List: port-sh3
Date: 07/21/2006 12:33:15
Hi!

A co-worker found a problem that system calls in kernel mode are
running in the highest interrupt level (SR:I[3-0] == 1111).  Can't
they safely run in the lowest interrupt level?

Masao

Index: arch/sh3/sh3/exception_vector.S
===================================================================
RCS file: /cvsroot/src/sys/arch/sh3/sh3/exception_vector.S,v
retrieving revision 1.18
diff -u -r1.18 exception_vector.S
--- arch/sh3/sh3/exception_vector.S	8 Feb 2006 02:19:57 -0000	1.18
+++ arch/sh3/sh3/exception_vector.S	21 Jul 2006 03:23:31 -0000
@@ -104,6 +104,7 @@
 	mov.l	r2,	@(TF_UBC, r14)	/* clear trapframe->tf_ubc */
 #endif /* DDB */
 	__EXCEPTION_UNBLOCK(r0, r1)
+	__INTR_UNMASK(r0, r1)
 	mov.l	_L.general, r0
 	jsr	@r0
 	 mov	r14,	r5	/* 2nd arg */