diff options
author | 2006-09-17 19:31:04 +0000 | |
---|---|---|
committer | 2006-09-17 19:31:04 +0000 | |
commit | c779db3a4d0bae5870ebb29d3c301609effc643b (patch) | |
tree | 8c57d4f583959282953e8bd8dbb53e9ff76b8b2f | |
parent | Move get ipmi id into the match function. This prevents attach from being (diff) | |
download | wireguard-openbsd-c779db3a4d0bae5870ebb29d3c301609effc643b.tar.xz wireguard-openbsd-c779db3a4d0bae5870ebb29d3c301609effc643b.zip |
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.
-rw-r--r-- | sys/arch/mac68k/mac68k/clock.c | 10 |
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(); } |