Remove obsolete `timerok' code, which dates back to when the timer/counter

interrupt handlers were pre-wired.
This commit is contained in:
pk 2004-05-12 15:44:28 +00:00
parent cdfa741c5c
commit d5cc51b7d3
2 changed files with 4 additions and 35 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: timer_msiiep.c,v 1.12 2004/02/13 11:36:18 wiz Exp $ */
/* $NetBSD: timer_msiiep.c,v 1.13 2004/05/12 15:44:28 pk Exp $ */
/*
* Copyright (c) 1992, 1993
@ -58,7 +58,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: timer_msiiep.c,v 1.12 2004/02/13 11:36:18 wiz Exp $");
__KERNEL_RCSID(0, "$NetBSD: timer_msiiep.c,v 1.13 2004/05/12 15:44:28 pk Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@ -73,8 +73,6 @@ __KERNEL_RCSID(0, "$NetBSD: timer_msiiep.c,v 1.12 2004/02/13 11:36:18 wiz Exp $"
#include <sparc/sparc/msiiepreg.h>
#include <sparc/sparc/msiiepvar.h>
static int timerok;
static struct intrhand level10;
static struct intrhand level14;
@ -131,19 +129,6 @@ statintr_msiiep(void *cap)
/* read the limit register to clear the interrupt */
discard = msiiep->pcic_pclr;
if (timerok == 0) {
/* Stop the clock */
#ifdef DIAGNOSTIC
printf("note: counter running!\n");
#endif
/*
* Turn interrupting processor counter
* into non-interrupting user timer.
*/
msiiep->pcic_pc_cfg = 1; /* make it a user timer */
msiiep->pcic_pc_ctl = 0; /* stop user timer */
return (1);
}
statclock(frame);
@ -245,8 +230,6 @@ timerattach_msiiep(struct device *parent, struct device *self, void *aux)
sched_cookie = softintr_establish(IPL_SCHED, schedintr, NULL);
if (sched_cookie == NULL)
panic("timerattach: cannot establish schedintr");
timerok = 1;
}
CFATTACH_DECL(timer_msiiep, sizeof(struct device),

View File

@ -1,4 +1,4 @@
/* $NetBSD: timer_sun4m.c,v 1.8 2003/07/15 00:05:10 lukem Exp $ */
/* $NetBSD: timer_sun4m.c,v 1.9 2004/05/12 15:44:28 pk Exp $ */
/*
* Copyright (c) 1992, 1993
@ -58,7 +58,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: timer_sun4m.c,v 1.8 2003/07/15 00:05:10 lukem Exp $");
__KERNEL_RCSID(0, "$NetBSD: timer_sun4m.c,v 1.9 2004/05/12 15:44:28 pk Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@ -76,8 +76,6 @@ __KERNEL_RCSID(0, "$NetBSD: timer_sun4m.c,v 1.8 2003/07/15 00:05:10 lukem Exp $"
struct timer_4m *timerreg4m;
#define counterreg4m cpuinfo.counterreg_4m
static int timerok;
/*
* Set up the real-time and statistics clocks.
* Leave stathz 0 only if no alternative timer is available.
@ -136,17 +134,6 @@ statintr_4m(void *cap)
/* read the limit register to clear the interrupt */
discard = counterreg4m->t_limit;
if (timerok == 0) {
/* Stop the clock */
#ifdef DIAGNOSTIC
printf("note: counter running!\n");
#endif
discard = counterreg4m->t_limit;
counterreg4m->t_limit = 0;
counterreg4m->t_ss = 0;
timerreg4m->t_cfg = TMR_CFG_USER;
return (1);
}
statclock(frame);
@ -245,5 +232,4 @@ timerattach_obio_4m(struct device *parent, struct device *self, void *aux)
timerreg4m->t_cfg = 0;
timerattach(&counterreg4m->t_counter, &counterreg4m->t_limit);
timerok = 1;
}