Remove the #include of rpb.h from clock.c and set hz from the hwrpb
in alpha_init() instead of from a hardwired 1024 in cpu_initclocks().
This commit is contained in:
parent
9b463a1108
commit
1e62e0ffd9
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: clock.c,v 1.19 1997/09/23 23:15:43 mjacob Exp $ */
|
/* $NetBSD: clock.c,v 1.20 1998/01/31 10:32:47 ross Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1988 University of Utah.
|
* Copyright (c) 1988 University of Utah.
|
||||||
@ -44,14 +44,13 @@
|
|||||||
|
|
||||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||||
|
|
||||||
__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.19 1997/09/23 23:15:43 mjacob Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.20 1998/01/31 10:32:47 ross Exp $");
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/kernel.h>
|
#include <sys/kernel.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
#include <sys/device.h>
|
#include <sys/device.h>
|
||||||
|
|
||||||
#include <machine/rpb.h>
|
|
||||||
#include <machine/autoconf.h>
|
#include <machine/autoconf.h>
|
||||||
#include <machine/cpuconf.h>
|
#include <machine/cpuconf.h>
|
||||||
|
|
||||||
@ -113,7 +112,6 @@ cpu_initclocks()
|
|||||||
if (clockfns == NULL)
|
if (clockfns == NULL)
|
||||||
panic("cpu_initclocks: no clock attached");
|
panic("cpu_initclocks: no clock attached");
|
||||||
|
|
||||||
hz = 1024; /* 1024 Hz clock */
|
|
||||||
tick = 1000000 / hz; /* number of microseconds between interrupts */
|
tick = 1000000 / hz; /* number of microseconds between interrupts */
|
||||||
tickfix = 1000000 - (hz * tick);
|
tickfix = 1000000 - (hz * tick);
|
||||||
if (tickfix) {
|
if (tickfix) {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: machdep.c,v 1.98 1998/01/31 02:20:44 cgd Exp $ */
|
/* $NetBSD: machdep.c,v 1.99 1998/01/31 10:32:49 ross Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
|
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
|
||||||
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||||
|
|
||||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.98 1998/01/31 02:20:44 cgd Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.99 1998/01/31 10:32:49 ross Exp $");
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
@ -248,6 +248,15 @@ alpha_init(pfn, ptb, bim, bip)
|
|||||||
*/
|
*/
|
||||||
init_prom_interface();
|
init_prom_interface();
|
||||||
|
|
||||||
|
hz = hwrpb->rpb_intr_freq >> 12;
|
||||||
|
if (!(60 <= hz && hz <= 10240)) {
|
||||||
|
hz = 1024;
|
||||||
|
#ifdef DIAGNOSTIC
|
||||||
|
printf("rpb_intr_freq of %ld=>%d hz was not believed\n",
|
||||||
|
hwrpb->rpb_intr_freq, hz);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check for a bootinfo from the boot program.
|
* Check for a bootinfo from the boot program.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user