Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Revert "Sprinkle cold conditionals to make tc_tickt...
details: https://anonhg.NetBSD.org/src/rev/a997861096e0
branches: trunk
changeset: 323798:a997861096e0
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Jul 01 15:12:06 2018 +0000
description:
Revert "Sprinkle cold conditionals to make tc_ticktock before inittimecounter."
Not needed if we're no longer doing tc_ticktock in printf.
diffstat:
sys/kern/kern_ntptime.c | 6 +++---
sys/kern/kern_tc.c | 14 ++++++--------
2 files changed, 9 insertions(+), 11 deletions(-)
diffs (83 lines):
diff -r 305571d94b5f -r a997861096e0 sys/kern/kern_ntptime.c
--- a/sys/kern/kern_ntptime.c Sun Jul 01 14:20:23 2018 +0000
+++ b/sys/kern/kern_ntptime.c Sun Jul 01 15:12:06 2018 +0000
@@ -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 @@
int tickrate;
l_fp ftemp; /* 32/64-bit temporary */
- KASSERT(__predict_false(cold) || mutex_owned(&timecounter_lock));
+ KASSERT(mutex_owned(&timecounter_lock));
#ifdef NTP
diff -r 305571d94b5f -r a997861096e0 sys/kern/kern_tc.c
--- a/sys/kern/kern_tc.c Sun Jul 01 14:20:23 2018 +0000
+++ b/sys/kern/kern_tc.c Sun Jul 01 15:12:06 2018 +0000
@@ -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 @@
{
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 @@
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 @@
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_windup();
- if (__predict_true(!cold))
- mutex_spin_exit(&timecounter_lock);
+ mutex_spin_exit(&timecounter_lock);
}
void
Home |
Main Index |
Thread Index |
Old Index