From d8a42482fc35eca9e72da7ff9959771add0ffb95 Mon Sep 17 00:00:00 2001 From: kato Date: Sun, 24 Aug 1997 11:09:36 +0000 Subject: Synchronize with sys/i386/i386/microtime.s revision up to 1.29. --- sys/pc98/i386/microtime.s | 39 ++++++++++----------------------------- 1 file 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 - -#ifdef APIC_IO -#include /** NEW STRATEGY, APIC_PIN0_TIMER */ -#endif /* APIC_IO */ +#include #include #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? */ -- cgit v1.1