diff options
author | fsmp <fsmp@FreeBSD.org> | 1997-08-10 20:59:07 +0000 |
---|---|---|
committer | fsmp <fsmp@FreeBSD.org> | 1997-08-10 20:59:07 +0000 |
commit | ce530fb8fa4f206001fcd8ea72ed1e688fb50ae6 (patch) | |
tree | ccb9245bba12bfb56b21461ccd55e2ba5dfdd235 /sys/i386/isa | |
parent | 1dfa4285cfa0b9ccaf496d58a56e76482ffdaaaf (diff) | |
download | FreeBSD-src-ce530fb8fa4f206001fcd8ea72ed1e688fb50ae6.zip FreeBSD-src-ce530fb8fa4f206001fcd8ea72ed1e688fb50ae6.tar.gz |
Added trap specific lock calls: get_fpu_lock, etc.
All resolve to the GIANT_LOCK at this time, it is purely a logical partitioning.
Diffstat (limited to 'sys/i386/isa')
-rw-r--r-- | sys/i386/isa/apic_vector.s | 21 | ||||
-rw-r--r-- | sys/i386/isa/ipl.s | 15 |
2 files changed, 23 insertions, 13 deletions
diff --git a/sys/i386/isa/apic_vector.s b/sys/i386/isa/apic_vector.s index 2134552..f73ddc5 100644 --- a/sys/i386/isa/apic_vector.s +++ b/sys/i386/isa/apic_vector.s @@ -1,13 +1,16 @@ /* * from: vector.s, 386BSD 0.1 unknown origin - * $Id: apic_vector.s,v 1.13 1997/07/31 05:42:05 fsmp Exp $ + * $Id: apic_vector.s,v 1.21 1997/08/10 20:47:53 smp Exp smp $ */ +#include <machine/apic.h> #include <machine/smp.h> #include <machine/smptests.h> /** PEND_INTS, various counters */ + #include "i386/isa/intr_machdep.h" + /* convert an absolute IRQ# into a bitmask */ #define IRQ_BIT(irq_num) (1 << (irq_num)) @@ -31,7 +34,9 @@ lock ; /* MP-safe */ \ btsl $(irq_num),iactive ; /* lazy masking */ \ jc 6f ; /* already active */ \ - TRY_ISRLOCK(irq_num) ; /* try to get lock */ \ + pushl $_mp_lock ; /* GIANT_LOCK */ \ + call _MPtrylock ; /* try to get lock */ \ + add $4, %esp ; \ testl %eax, %eax ; /* did we get it? */ \ jnz 8f ; /* yes, enter kernel */ \ 6: ; /* active or locked */ \ @@ -83,7 +88,7 @@ ; \ ALIGN_TEXT ; \ 1: ; \ - GET_MPLOCK /* SMP Spin lock */ + call _get_mplock /* SMP Spin lock */ #endif /* PEND_INTS */ @@ -123,7 +128,7 @@ IDTVEC(vec_name) ; \ movl %ax,%ds ; \ MAYBE_MOVW_AX_ES ; \ FAKE_MCOUNT((4+ACTUALLY_PUSHED)*4(%esp)) ; \ - GET_ISRLOCK(irq_num) ; \ + call _get_isrlock ; \ pushl _intr_unit + (irq_num) * 4 ; \ call *_intr_handler + (irq_num) * 4 ; /* do the work ASAP */ \ movl $0, lapic_eoi ; \ @@ -137,7 +142,9 @@ IDTVEC(vec_name) ; \ jne 2f ; /* yes, maybe handle them */ \ 1: ; \ MEXITCOUNT ; \ - REL_ISRLOCK(irq_num) ; \ + pushl $_mp_lock ; /* GIANT_LOCK */ \ + call _MPrellock ; \ + add $4, %esp ; \ MAYBE_POPL_ES ; \ popl %ds ; \ popl %edx ; \ @@ -210,7 +217,9 @@ __CONCAT(Xresume,irq_num): ; \ /* XXX skip mcounting here to avoid double count */ \ lock ; /* MP-safe */ \ orl $IRQ_BIT(irq_num), _ipending ; \ - REL_ISRLOCK(irq_num) ; \ + pushl $_mp_lock ; /* GIANT_LOCK */ \ + call _MPrellock ; \ + add $4, %esp ; \ popl %es ; \ popl %ds ; \ popal ; \ diff --git a/sys/i386/isa/ipl.s b/sys/i386/isa/ipl.s index 45b0de5..acf8621 100644 --- a/sys/i386/isa/ipl.s +++ b/sys/i386/isa/ipl.s @@ -36,7 +36,7 @@ * * @(#)ipl.s * - * $Id: ipl.s,v 1.5 1997/07/31 05:42:06 fsmp Exp $ + * $Id: ipl.s,v 1.5 1997/08/10 20:47:53 smp Exp smp $ */ @@ -137,11 +137,12 @@ doreti_stop: nop 1: #endif /* VM86 */ -#if 0 - REL_MPLOCK -#else - REL_ISRLOCK(-1) -#endif + + /* release the kernel lock */ + pushl $_mp_lock /* GIANT_LOCK */ + call _MPrellock + add $4, %esp + .globl doreti_popl_es doreti_popl_es: popl %es @@ -356,4 +357,4 @@ swi_tty: #include "i386/isa/apic_ipl.s" #else #include "i386/isa/icu_ipl.s" -#endif /* APIC_IO */ +#endif /* APIC_IO */ |