summaryrefslogtreecommitdiffstats
path: root/sys/pc98
diff options
context:
space:
mode:
authorkato <kato@FreeBSD.org>1997-08-21 08:23:52 +0000
committerkato <kato@FreeBSD.org>1997-08-21 08:23:52 +0000
commitfc90e7c8fe7b893796d9ce627e50b6bc8ba5789f (patch)
treef6ca2d11934d7b6f53314354ea69a88bad79b463 /sys/pc98
parent336363fe282db2f9839b0378fee1fce08ffd1ff5 (diff)
downloadFreeBSD-src-fc90e7c8fe7b893796d9ce627e50b6bc8ba5789f.zip
FreeBSD-src-fc90e7c8fe7b893796d9ce627e50b6bc8ba5789f.tar.gz
Synchronize with sys/i386/isa/clock.c revision 1.99.
Diffstat (limited to 'sys/pc98')
-rw-r--r--sys/pc98/cbus/clock.c40
-rw-r--r--sys/pc98/cbus/pcrtc.c40
-rw-r--r--sys/pc98/pc98/clock.c40
3 files changed, 18 insertions, 102 deletions
diff --git a/sys/pc98/cbus/clock.c b/sys/pc98/cbus/clock.c
index f11e15a..02b8a6a 100644
--- a/sys/pc98/cbus/clock.c
+++ b/sys/pc98/cbus/clock.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
- * $Id: clock.c,v 1.30 1997/07/23 11:28:39 kato Exp $
+ * $Id: clock.c,v 1.31 1997/07/26 13:52:47 kato Exp $
*/
/*
@@ -70,7 +70,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>
@@ -84,6 +83,9 @@
#endif
#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.
@@ -1163,11 +1165,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) {
/*
@@ -1201,33 +1198,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];
@@ -1271,9 +1241,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
diff --git a/sys/pc98/cbus/pcrtc.c b/sys/pc98/cbus/pcrtc.c
index f11e15a..02b8a6a 100644
--- a/sys/pc98/cbus/pcrtc.c
+++ b/sys/pc98/cbus/pcrtc.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
- * $Id: clock.c,v 1.30 1997/07/23 11:28:39 kato Exp $
+ * $Id: clock.c,v 1.31 1997/07/26 13:52:47 kato Exp $
*/
/*
@@ -70,7 +70,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>
@@ -84,6 +83,9 @@
#endif
#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.
@@ -1163,11 +1165,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) {
/*
@@ -1201,33 +1198,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];
@@ -1271,9 +1241,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
diff --git a/sys/pc98/pc98/clock.c b/sys/pc98/pc98/clock.c
index f11e15a..02b8a6a 100644
--- a/sys/pc98/pc98/clock.c
+++ b/sys/pc98/pc98/clock.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
- * $Id: clock.c,v 1.30 1997/07/23 11:28:39 kato Exp $
+ * $Id: clock.c,v 1.31 1997/07/26 13:52:47 kato Exp $
*/
/*
@@ -70,7 +70,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>
@@ -84,6 +83,9 @@
#endif
#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.
@@ -1163,11 +1165,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) {
/*
@@ -1201,33 +1198,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];
@@ -1271,9 +1241,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