re-order initialization sequence to have real counters available during autoconfig
This commit is contained in:
parent
f6ad6a2699
commit
54cd6fafa8
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: init_main.c,v 1.267 2006/06/07 22:33:39 kardel Exp $ */
|
||||
/* $NetBSD: init_main.c,v 1.268 2006/06/09 22:47:56 kardel Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1989, 1991, 1992, 1993
|
||||
|
@ -71,7 +71,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.267 2006/06/07 22:33:39 kardel Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.268 2006/06/09 22:47:56 kardel Exp $");
|
||||
|
||||
#include "opt_ipsec.h"
|
||||
#include "opt_kcont.h"
|
||||
|
@ -292,6 +292,7 @@ main(void)
|
|||
|
||||
|
||||
#ifdef __HAVE_TIMECOUNTER
|
||||
inittimecounter();
|
||||
#ifdef NTP
|
||||
ntp_init();
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: kern_clock.c,v 1.100 2006/06/08 17:23:11 drochner Exp $ */
|
||||
/* $NetBSD: kern_clock.c,v 1.101 2006/06/09 22:47:56 kardel Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000, 2004 The NetBSD Foundation, Inc.
|
||||
|
@ -76,7 +76,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_clock.c,v 1.100 2006/06/08 17:23:11 drochner Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_clock.c,v 1.101 2006/06/09 22:47:56 kardel Exp $");
|
||||
|
||||
#include "opt_ntp.h"
|
||||
#include "opt_multiprocessor.h"
|
||||
|
@ -397,7 +397,6 @@ initclocks(void)
|
|||
*/
|
||||
psdiv = 1;
|
||||
#ifdef __HAVE_TIMECOUNTER
|
||||
inittimecounter();
|
||||
/*
|
||||
* provide minimum default time counter
|
||||
* will only run at interrupt resolution
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: kern_tc.c,v 1.2 2006/06/07 22:33:40 kardel Exp $ */
|
||||
/* $NetBSD: kern_tc.c,v 1.3 2006/06/09 22:47:56 kardel Exp $ */
|
||||
|
||||
/*-
|
||||
* ----------------------------------------------------------------------------
|
||||
|
@ -11,7 +11,7 @@
|
|||
|
||||
#include <sys/cdefs.h>
|
||||
/* __FBSDID("$FreeBSD: src/sys/kern/kern_tc.c,v 1.166 2005/09/19 22:16:31 andre Exp $"); */
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_tc.c,v 1.2 2006/06/07 22:33:40 kardel Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_tc.c,v 1.3 2006/06/09 22:47:56 kardel Exp $");
|
||||
|
||||
#include "opt_ntp.h"
|
||||
|
||||
|
@ -496,6 +496,7 @@ tc_init(struct timecounter *tc)
|
|||
(void)tc->tc_get_timecount(tc);
|
||||
(void)tc->tc_get_timecount(tc);
|
||||
timecounter = tc;
|
||||
tc_windup();
|
||||
}
|
||||
|
||||
/* Report the frequency of the current timecounter. */
|
||||
|
|
Loading…
Reference in New Issue