summaryrefslogtreecommitdiffstats
path: root/sys/isa
diff options
context:
space:
mode:
authorfsmp <fsmp@FreeBSD.org>1997-08-21 05:08:25 +0000
committerfsmp <fsmp@FreeBSD.org>1997-08-21 05:08:25 +0000
commit50236db5333cdc58157e0ad9c48b24efe702d9d3 (patch)
treec85a743ad15448292b7f250fbc5f3e4352835dd7 /sys/isa
parent5d3c68aeda6b25c847b3ad8a14bb11a9d77328aa (diff)
downloadFreeBSD-src-50236db5333cdc58157e0ad9c48b24efe702d9d3.zip
FreeBSD-src-50236db5333cdc58157e0ad9c48b24efe702d9d3.tar.gz
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.
Diffstat (limited to 'sys/isa')
-rw-r--r--sys/isa/atrtc.c40
1 files changed, 6 insertions, 34 deletions
diff --git a/sys/isa/atrtc.c b/sys/isa/atrtc.c
index 5b54178..7f89a7f 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
OpenPOWER on IntegriCloud