Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern timecounter(9): Revert last -- timecounter_lock is ...



details:   https://anonhg.NetBSD.org/src/rev/7b2938295e1a
branches:  trunk
changeset: 377562:7b2938295e1a
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Jul 17 13:42:02 2023 +0000

description:
timecounter(9): Revert last -- timecounter_lock is already IPL_HIGH.

diffstat:

 sys/kern/kern_tc.c |  7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diffs (42 lines):

diff -r 3aa5b57a9028 -r 7b2938295e1a sys/kern/kern_tc.c
--- a/sys/kern/kern_tc.c        Mon Jul 17 13:35:07 2023 +0000
+++ b/sys/kern/kern_tc.c        Mon Jul 17 13:42:02 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_tc.c,v 1.65 2023/07/17 13:35:07 riastradh Exp $ */
+/* $NetBSD: kern_tc.c,v 1.66 2023/07/17 13:42:02 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.65 2023/07/17 13:35:07 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_tc.c,v 1.66 2023/07/17 13:42:02 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ntp.h"
@@ -172,7 +172,6 @@ setrealuptime(time_t second, time_t upti
 {
        uint32_t seclo = second & 0xffffffff, sechi = second >> 32;
        uint32_t uplo = uptime & 0xffffffff, uphi = uptime >> 32;
-       int s;
 
        KDASSERT(mutex_owned(&timecounter_lock));
 
@@ -187,7 +186,6 @@ setrealuptime(time_t second, time_t upti
                return;
        }
 
-       s = splhigh();
        atomic_store_relaxed(&time__second32.hi, 0xffffffff);
        atomic_store_relaxed(&time__uptime32.hi, 0xffffffff);
        membar_producer();
@@ -196,7 +194,6 @@ setrealuptime(time_t second, time_t upti
        membar_producer();
        atomic_store_relaxed(&time__second32.hi, sechi);
        atomic_store_relaxed(&time__uptime32.hi, uphi);
-       splx(s);
 }
 
 time_t



Home | Main Index | Thread Index | Old Index