Revert "Sprinkle cold conditionals to make tc_ticktock before inittimecounter."

Not needed if we're no longer doing tc_ticktock in printf.
This commit is contained in:
riastradh 2018-07-01 15:12:06 +00:00
parent 46e5459c53
commit 92e1684438
2 changed files with 9 additions and 11 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_ntptime.c,v 1.58 2018/06/30 22:47:51 riastradh Exp $ */
/* $NetBSD: kern_ntptime.c,v 1.59 2018/07/01 15:12:06 riastradh Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@ -60,7 +60,7 @@
#include <sys/cdefs.h>
/* __FBSDID("$FreeBSD: src/sys/kern/kern_ntptime.c,v 1.59 2005/05/28 14:34:41 rwatson Exp $"); */
__KERNEL_RCSID(0, "$NetBSD: kern_ntptime.c,v 1.58 2018/06/30 22:47:51 riastradh Exp $");
__KERNEL_RCSID(0, "$NetBSD: kern_ntptime.c,v 1.59 2018/07/01 15:12:06 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_ntp.h"
@ -418,7 +418,7 @@ ntp_update_second(int64_t *adjustment, time_t *newsec)
int tickrate;
l_fp ftemp; /* 32/64-bit temporary */
KASSERT(__predict_false(cold) || mutex_owned(&timecounter_lock));
KASSERT(mutex_owned(&timecounter_lock));
#ifdef NTP

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_tc.c,v 1.50 2018/06/30 22:47:51 riastradh Exp $ */
/* $NetBSD: kern_tc.c,v 1.51 2018/07/01 15:12:06 riastradh Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@ -40,7 +40,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.50 2018/06/30 22:47:51 riastradh Exp $");
__KERNEL_RCSID(0, "$NetBSD: kern_tc.c,v 1.51 2018/07/01 15:12:06 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_ntp.h"
@ -572,7 +572,7 @@ tc_pick(void)
{
struct timecounter *best, *tc;
KASSERT(__predict_false(cold) || mutex_owned(&timecounter_lock));
KASSERT(mutex_owned(&timecounter_lock));
for (best = tc = timecounters; tc != NULL; tc = tc->tc_next) {
if (tc->tc_quality > best->tc_quality)
@ -731,7 +731,7 @@ tc_windup(void)
int i, s_update;
time_t t;
KASSERT(__predict_false(cold) || mutex_owned(&timecounter_lock));
KASSERT(mutex_owned(&timecounter_lock));
s_update = 0;
@ -1308,8 +1308,7 @@ tc_ticktock(void)
if (++count < tc_tick)
return;
count = 0;
if (__predict_true(!cold))
mutex_spin_enter(&timecounter_lock);
mutex_spin_enter(&timecounter_lock);
if (timecounter_bad != 0) {
/* An existing timecounter has gone bad, pick a new one. */
(void)atomic_swap_uint(&timecounter_bad, 0);
@ -1318,8 +1317,7 @@ tc_ticktock(void)
}
}
tc_windup();
if (__predict_true(!cold))
mutex_spin_exit(&timecounter_lock);
mutex_spin_exit(&timecounter_lock);
}
void