diff options
author | Steve Passe <fsmp@FreeBSD.org> | 1997-08-21 05:08:25 +0000 |
---|---|---|
committer | Steve Passe <fsmp@FreeBSD.org> | 1997-08-21 05:08:25 +0000 |
commit | 4a73d99f7e1e537fcf59bb0529e09869d477df52 (patch) | |
tree | a5bbb422b5438cd961e24df92857122f3965ed5f /sys/isa | |
parent | dc3001cf357baa1d3fca2f6e9b49c9b1e5919713 (diff) | |
download | src-4a73d99f7e1e537fcf59bb0529e09869d477df52.tar.gz src-4a73d99f7e1e537fcf59bb0529e09869d477df52.zip |
Made PEND_INTS default.
Made NEW_STRATEGY default.
Removed misc. old cruft.
Centralized simple locks into mp_machdep.c
Centralized simple lock macros into param.h
More cleanup in the direction of making splxx()/cpl MP-safe.
Notes
Notes:
svn path=/head/; revision=28487
Diffstat (limited to 'sys/isa')
-rw-r--r-- | sys/isa/atrtc.c | 40 |
1 files changed, 6 insertions, 34 deletions
diff --git a/sys/isa/atrtc.c b/sys/isa/atrtc.c index 5b5417856cfa..7f89a7ff25df 100644 --- a/sys/isa/atrtc.c +++ b/sys/isa/atrtc.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 - * $Id: clock.c,v 1.97 1997/07/22 20:12:04 fsmp Exp $ + * $Id: clock.c,v 1.8 1997/08/21 04:51:12 smp Exp smp $ */ /* @@ -66,7 +66,6 @@ #include <machine/ipl.h> #ifdef APIC_IO #include <machine/smp.h> -#include <machine/smptests.h> /** NEW_STRATEGY (,SMP_TIMER_NC) */ #endif /* APIC_IO */ #include <i386/isa/icu.h> @@ -74,6 +73,9 @@ #include <i386/isa/rtc.h> #include <i386/isa/timerreg.h> +#include <i386/isa/intr_machdep.h> +#include <sys/interrupt.h> + /* * 32-bit time_t's can't reach leap years before 1904 or after 2036, so we * can use a simple formula for leap years. @@ -859,11 +861,6 @@ cpu_initclocks() /* Finish initializing 8253 timer 0. */ #ifdef APIC_IO -#ifdef NEW_STRATEGY -#ifdef SMP_TIMER_NC -#error 'options SMP_TIMER_NC' no longer used, remove & reconfig. -#endif /** XXX SMP_TIMER_NC */ - /* 1st look for ExtInt on pin 0 */ if (apic_int_type(0, 0) == 3) { /* @@ -897,33 +894,6 @@ cpu_initclocks() else panic("neither pin 0 or pin 2 works for 8254"); -#else /** NEW_STRATEGY */ - - /* 8254 is traditionally on ISA IRQ0 */ -#if defined(SMP_TIMER_NC) - x = -1; -#else - x = isa_apic_pin(0); -#endif /** XXX SMP_TIMER_NC */ - - if (x < 0) { - /* bummer, attempt to redirect thru the 8259 */ - if (bootverbose) - printf("APIC missing 8254 connection\n"); - - /* allow 8254 timer to INTerrupt 8259 */ - x = inb(IO_ICU1 + 1); /* current mask in 8259 */ - x &= ~1; /* clear 8254 timer mask */ - outb(IO_ICU1 + 1, x); /* write new mask */ - - /* program IO APIC for type 3 INT on INT0 */ - if (ext_int_setup(0, 0) < 0) - panic("8254 redirect impossible!"); - x = 0; /* 8259 is on 0 */ - } - -#endif /** NEW_STRATEGY */ - /* setup the vectors */ vec[x] = (u_int)vec8254; Xintr8254 = (u_int)ivectors[x]; @@ -966,9 +936,11 @@ cpu_initclocks() if (isa_apic_pin(8) != 8) panic("APIC RTC != 8"); #endif /* APIC_IO */ + register_intr(/* irq */ 8, /* XXX id */ 1, /* flags */ 0, /* XXX */ (inthand2_t *)rtcintr, &stat_imask, /* unit */ 0); + #ifdef APIC_IO INTREN(APIC_IRQ8); #else |