summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkato <kato@FreeBSD.org>1997-08-24 11:09:36 +0000
committerkato <kato@FreeBSD.org>1997-08-24 11:09:36 +0000
commitd8a42482fc35eca9e72da7ff9959771add0ffb95 (patch)
tree2d57a410f0d95447245c5db68ecc57ebde87ec74
parent1bb3924f27c5b81d0e38ede68fe6c1678c2d867d (diff)
downloadFreeBSD-src-d8a42482fc35eca9e72da7ff9959771add0ffb95.zip
FreeBSD-src-d8a42482fc35eca9e72da7ff9959771add0ffb95.tar.gz
Synchronize with sys/i386/i386/microtime.s revision up to 1.29.
-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 fd007dc..211c747 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? */
OpenPOWER on IntegriCloud