No need to block out ZS interrupts in clock_intr() as long as
we are careful to use the single_inst_* macros.
This commit is contained in:
parent
9587adc460
commit
88bf00b5bf
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: clock.c,v 1.36 1997/03/04 23:37:48 gwr Exp $ */
|
/* $NetBSD: clock.c,v 1.37 1997/03/05 00:01:13 gwr Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1994 Gordon W. Ross
|
* Copyright (c) 1994 Gordon W. Ross
|
||||||
|
@ -261,16 +261,16 @@ setstatclockrate(newhz)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This is is called by the "custom" interrupt handler.
|
* This is is called by the "custom" interrupt handler.
|
||||||
|
* Note that we can get ZS interrupts while this runs,
|
||||||
|
* and those may touch the interrupt_reg, so we have to
|
||||||
|
* be careful to use the single_inst_* macros to modify
|
||||||
|
* the interrupt register atomically.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
clock_intr(cf)
|
clock_intr(cf)
|
||||||
struct clockframe cf;
|
struct clockframe cf;
|
||||||
{
|
{
|
||||||
register volatile struct intersil7170 *clk = intersil_clock;
|
register volatile struct intersil7170 *clk = intersil_clock;
|
||||||
int s;
|
|
||||||
|
|
||||||
/* Prevent ZS interrupts while we tickle the clock. */
|
|
||||||
s = splhigh();
|
|
||||||
|
|
||||||
/* Read the clock interrupt register. */
|
/* Read the clock interrupt register. */
|
||||||
(void) clk->clk_intr_reg;
|
(void) clk->clk_intr_reg;
|
||||||
|
@ -280,9 +280,6 @@ clock_intr(cf)
|
||||||
/* Read the clock intr. reg AGAIN! */
|
/* Read the clock intr. reg AGAIN! */
|
||||||
(void) clk->clk_intr_reg;
|
(void) clk->clk_intr_reg;
|
||||||
|
|
||||||
/* Back to normal clock priority. */
|
|
||||||
splx(s);
|
|
||||||
|
|
||||||
/* Call common clock interrupt handler. */
|
/* Call common clock interrupt handler. */
|
||||||
hardclock(&cf);
|
hardclock(&cf);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue