summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2006-09-17 19:31:05 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2006-09-17 19:31:05 +0000
commitc329a0971f0b33fe61eabf458596c87ea9608bf4 (patch)
tree32c7391e04fb76077d159c7c67c63d75933b2948 /sys/arch
parenta8a23c807fcc80692b39f05eb0e8cb2a3d874134 (diff)
Shorten the area where interrupts are enabled to calibrate delay(), and run
this at splclock() instead of spl0(), so that potential spurious network or scsi interrupts on machines running in A/UX interrupt mode do not hang there.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/mac68k/mac68k/clock.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/arch/mac68k/mac68k/clock.c b/sys/arch/mac68k/mac68k/clock.c
index 07ba4a2128a..b45dff3eb5d 100644
--- a/sys/arch/mac68k/mac68k/clock.c
+++ b/sys/arch/mac68k/mac68k/clock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clock.c,v 1.21 2006/01/15 00:10:24 miod Exp $ */
+/* $OpenBSD: clock.c,v 1.22 2006/09/17 19:31:04 miod Exp $ */
/* $NetBSD: clock.c,v 1.39 1999/11/05 19:14:56 scottr Exp $ */
/*
@@ -352,8 +352,6 @@ mac68k_calibrate_delay()
{
u_int sum, n;
- (void)spl0();
-
/* Disable VIA1 timer 1 interrupts and set up service routine */
via_reg(VIA1, vIER) = V1IF_T1;
via1_register_irq(VIA1_T1, delay_timer1_irq, NULL, NULL);
@@ -368,6 +366,8 @@ mac68k_calibrate_delay()
printf("mac68k_calibrate_delay(): entering timing loop\n");
#endif
+ (void)splclock();
+
for (sum = 0, n = 8; n > 0; n--) {
delay_flag = 1;
via_reg(VIA1, vT1C) = 0; /* 1024 clock ticks */
@@ -375,6 +375,8 @@ mac68k_calibrate_delay()
sum += ((delay_factor >> 7) - _delay(1));
}
+ (void)splhigh();
+
/* Disable timer interrupts and reset service routine */
via_reg(VIA1, vIER) = V1IF_T1;
via1_register_irq(VIA1_T1, rtclock_intr, NULL, NULL);
@@ -404,6 +406,4 @@ mac68k_calibrate_delay()
if (clock_debug)
printf("mac68k_calibrate_delay(): delay_factor calibrated\n");
#endif
-
- (void)splhigh();
}