Poll console at 50 Hz, not 1024 Hz! (4 tlb and imb coherency ops per poll
make this exceedingly expensive even on an alpha) Note: only 3 systypes still use promcons.
This commit is contained in:
parent
331fee623e
commit
39254d4d4b
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: promcons.c,v 1.10 1998/02/13 02:09:10 cgd Exp $ */
|
||||
/* $NetBSD: promcons.c,v 1.11 1998/03/01 07:40:11 ross Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
|
||||
|
@ -29,7 +29,7 @@
|
|||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: promcons.c,v 1.10 1998/02/13 02:09:10 cgd Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: promcons.c,v 1.11 1998/03/01 07:40:11 ross Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -51,7 +51,10 @@ __KERNEL_RCSID(0, "$NetBSD: promcons.c,v 1.10 1998/02/13 02:09:10 cgd Exp $");
|
|||
|
||||
#ifdef _PMAP_MAY_USE_PROM_CONSOLE
|
||||
|
||||
#define PROM_POLL_HZ 50
|
||||
|
||||
static struct tty *prom_tty[1];
|
||||
static int polltime;
|
||||
|
||||
cdev_decl(prom);
|
||||
|
||||
|
@ -103,8 +106,12 @@ promopen(dev, flag, mode, p)
|
|||
splx(s);
|
||||
|
||||
error = (*linesw[tp->t_line].l_open)(dev, tp);
|
||||
if (error == 0 && setuptimeout)
|
||||
timeout(promtimeout, tp, 1);
|
||||
if (error == 0 && setuptimeout) {
|
||||
polltime = hz / PROM_POLL_HZ;
|
||||
if (polltime < 1)
|
||||
polltime = 1;
|
||||
timeout(promtimeout, tp, polltime);
|
||||
}
|
||||
return error;
|
||||
}
|
||||
|
||||
|
@ -227,7 +234,7 @@ promtimeout(v)
|
|||
if (tp->t_state & TS_ISOPEN)
|
||||
(*linesw[tp->t_line].l_rint)(c, tp);
|
||||
}
|
||||
timeout(promtimeout, tp, 1);
|
||||
timeout(promtimeout, tp, polltime);
|
||||
}
|
||||
|
||||
struct tty *
|
||||
|
|
Loading…
Reference in New Issue