summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/apic_ipl.s
diff options
context:
space:
mode:
authorfsmp <fsmp@FreeBSD.org>1997-09-07 22:04:09 +0000
committerfsmp <fsmp@FreeBSD.org>1997-09-07 22:04:09 +0000
commit877f33cf608a56f37130585cbf62e69a7fa8867e (patch)
tree6c18f1143fc34dc43e409761227569d2ec2324bc /sys/i386/isa/apic_ipl.s
parent6787a3eb7ff21685017eabc3972f4a5b24109e70 (diff)
downloadFreeBSD-src-877f33cf608a56f37130585cbf62e69a7fa8867e.zip
FreeBSD-src-877f33cf608a56f37130585cbf62e69a7fa8867e.tar.gz
General cleanup of the lock pushdown code. They are grouped and enabled
from machine/smptests.h: #define PUSHDOWN_LEVEL_1 #define PUSHDOWN_LEVEL_2 #define PUSHDOWN_LEVEL_3 #define PUSHDOWN_LEVEL_4_NOT
Diffstat (limited to 'sys/i386/isa/apic_ipl.s')
-rw-r--r--sys/i386/isa/apic_ipl.s37
1 files changed, 20 insertions, 17 deletions
diff --git a/sys/i386/isa/apic_ipl.s b/sys/i386/isa/apic_ipl.s
index 6df74c3..e0c6027 100644
--- a/sys/i386/isa/apic_ipl.s
+++ b/sys/i386/isa/apic_ipl.s
@@ -22,22 +22,10 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: apic_ipl.s,v 1.32 1997/08/29 18:39:36 smp Exp smp $
+ * $Id: apic_ipl.s,v 1.35 1997/09/07 19:23:45 smp Exp smp $
*/
-#ifdef REAL_AICPL
-
-#define AICPL_LOCK SCPL_LOCK
-#define AICPL_UNLOCK SCPL_UNLOCK
-
-#else /* REAL_AICPL */
-
-#define AICPL_LOCK
-#define AICPL_UNLOCK
-
-#endif /* REAL_AICPL */
-
.data
ALIGN_DATA
@@ -59,7 +47,15 @@ _Xintr8254:
_mask8254:
.long 0
-/* */
+/*
+ * Routines used by splz_unpend to build an interrupt frame from a
+ * trap frame. The _vec[] routines build the proper frame on the stack,
+ * then call one of _Xintr0 thru _XintrNN.
+ *
+ * used by:
+ * i386/isa/apic_ipl.s (this file): splz_unpend JUMPs to HWIs.
+ * i386/isa/clock.c: setup _vec[clock] to point at _vec8254.
+ */
.globl _vec
_vec:
.long vec0, vec1, vec2, vec3, vec4, vec5, vec6, vec7
@@ -111,7 +107,7 @@ ENTRY(splz)
*/
AICPL_LOCK
movl _cpl,%eax
-#ifdef INTR_SIMPLELOCK
+#ifdef CPL_AND_CML
orl _cml, %eax /* add cml to cpl */
#endif
splz_next:
@@ -130,14 +126,19 @@ splz_next:
splz_unpend:
bsfl %ecx,%ecx
lock
- btrl %ecx, _ipending
+ btrl %ecx, _ipending
jnc splz_next
+ /*
+ * HWIs: will JUMP thru *_vec[], see comments below.
+ * SWIs: setup CALL of swi_tty, swi_net, _softclock, swi_ast.
+ */
movl ihandlers(,%ecx,4),%edx
testl %edx,%edx
je splz_next /* "can't happen" */
cmpl $NHWI,%ecx
jae splz_swi
AICPL_UNLOCK
+
/*
* We would prefer to call the intr handler directly here but that
* doesn't work for badly behaved handlers that want the interrupt
@@ -146,7 +147,7 @@ splz_unpend:
* determined at config time.
*
* The vec[] routines build the proper frame on the stack,
- * then call one of _Xintr0 thru _Xintr23
+ * then call one of _Xintr0 thru _XintrNN.
*/
jmp *_vec(,%ecx,4)
@@ -169,6 +170,8 @@ splz_swi:
* of from here, so that system profiling works.
* XXX do this more generally (for all vectors; look up the C entry point).
* XXX frame bogusness stops us from just jumping to the C entry point.
+ * We have to clear iactive since this is an unpend call, and it will be
+ * set from the time of the original INT.
*/
/*
OpenPOWER on IntegriCloud