summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKATO Takenori <kato@FreeBSD.org>1997-08-24 11:09:36 +0000
committerKATO Takenori <kato@FreeBSD.org>1997-08-24 11:09:36 +0000
commit9f23ef9d3ccb61fccff510d4b6c133600fc1dbf3 (patch)
tree04e4e97b70e5cf2ac96fd92602d52bdcf806f042
parentca4da38dc6b025b260ac492773f4a3163f0bddcf (diff)
Notes
-rw-r--r--sys/pc98/i386/microtime.s39
1 files changed, 10 insertions, 29 deletions
diff --git a/sys/pc98/i386/microtime.s b/sys/pc98/i386/microtime.s
index fd007dc4e7ca..211c7470f626 100644
--- a/sys/pc98/i386/microtime.s
+++ b/sys/pc98/i386/microtime.s
@@ -32,16 +32,13 @@
* SUCH DAMAGE.
*
* from: Steve McCanne's microtime code
- * $Id: microtime.s,v 1.12 1997/07/20 11:56:48 kato Exp $
+ * $Id: microtime.s,v 1.13 1997/07/21 13:12:45 kato Exp $
*/
#include "opt_cpu.h"
#include <machine/asmacros.h>
-
-#ifdef APIC_IO
-#include <machine/smptests.h> /** NEW STRATEGY, APIC_PIN0_TIMER */
-#endif /* APIC_IO */
+#include <machine/param.h>
#include <i386/isa/icu.h>
#ifdef PC98
@@ -118,21 +115,18 @@ ENTRY(microtime)
movl _timer0_max_count, %edx /* prepare for 2 uses */
#ifdef APIC_IO
-#ifdef NEW_STRATEGY
-
+#if defined(REAL_MCPL) /* XXX do we need this??? */
+ pushl %ecx /* s_lock destroys %eax, %ecx */
+ CPL_LOCK /* MP-safe, INTs disabled above */
+ popl %ecx /* restore %ecx */
movl _ipending, %eax
+ movl $0, _cpl_lock /* s_unlock would destroy %eax */
testl %eax, _mask8254 /* is soft timer interrupt pending? */
-
-#else /** NEW_STRATEGY */
-
-#ifdef APIC_PIN0_TIMER
- testl $IRQ0, _ipending /* is soft timer interrupt pending? */
-#else
+#else /* REAL_MCPL */
+ /** XXX FIXME: take our chances with a race, is this OK? */
movl _ipending, %eax
testl %eax, _mask8254 /* is soft timer interrupt pending? */
-#endif /* APIC_PIN0_TIMER */
-
-#endif /** NEW_STRATEGY */
+#endif /* REAL_MCPL */
#else
testb $IRQ0, _ipending /* is soft timer interrupt pending? */
#endif /* APIC_IO */
@@ -143,21 +137,8 @@ ENTRY(microtime)
jbe 1f
#ifdef APIC_IO
-#ifdef NEW_STRATEGY
-
movl lapic_irr1, %eax /** XXX assumption: IRQ0-24 */
testl %eax, _mask8254 /* is hard timer interrupt pending? */
-
-#else /** NEW_STRATEGY */
-
-#ifdef APIC_PIN0_TIMER
- testl $IRQ0, lapic_irr1
-#else
- movl lapic_irr1, %eax /** XXX assumption: IRQ0-24 */
- testl %eax, _mask8254 /* is hard timer interrupt pending? */
-#endif /* APIC_PIN0_TIMER */
-
-#endif /** NEW_STRATEGY */
#else
inb $IO_ICU1, %al /* read IRR in ICU */
testb $IRQ0, %al /* is hard timer interrupt pending? */