Synchronize with sys/i386/i386/microtime.s revision up to 1.29.

This commit is contained in:
kato 1997-08-24 11:09:36 +00:00
parent 1bb3924f27
commit d8a42482fc

@ -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 /* REAL_MCPL */
/** XXX FIXME: take our chances with a race, is this OK? */
movl _ipending, %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
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? */