Module Name:    src
Committed By:   thorpej
Date:           Tue Mar  5 14:15:36 UTC 2024

Modified Files:
        src/sys/arch/aarch64/aarch64: aarch64_reboot.c
        src/sys/arch/algor/algor: machdep.c
        src/sys/arch/alpha/alpha: machdep.c
        src/sys/arch/amd64/amd64: machdep.c
        src/sys/arch/amiga/amiga: machdep.c
        src/sys/arch/amigappc/amigappc: machdep.c
        src/sys/arch/amigappc/include: autoconf.h
        src/sys/arch/arc/arc: machdep.c
        src/sys/arch/arm/arm32: arm32_machdep.c
        src/sys/arch/atari/atari: machdep.c
        src/sys/arch/bebox/bebox: machdep.c
        src/sys/arch/cesfic/cesfic: machdep.c
        src/sys/arch/cobalt/cobalt: machdep.c
        src/sys/arch/dreamcast/dreamcast: machdep.c
        src/sys/arch/emips/emips: machdep.c
        src/sys/arch/evbarm/imx23_olinuxino: imx23_olinuxino_machdep.c
        src/sys/arch/evbmips/adm5120: machdep.c
        src/sys/arch/evbmips/alchemy: machdep.c
        src/sys/arch/evbmips/atheros: machdep.c
        src/sys/arch/evbmips/cavium: machdep.c
        src/sys/arch/evbmips/gdium: machdep.c
        src/sys/arch/evbmips/ingenic: machdep.c
        src/sys/arch/evbmips/loongson: machdep.c
        src/sys/arch/evbmips/malta: machdep.c
        src/sys/arch/evbmips/mipssim: machdep.c
        src/sys/arch/evbmips/rasoc: machdep.c
        src/sys/arch/evbmips/rmixl: machdep.c
        src/sys/arch/evbmips/sbmips: machdep.c
        src/sys/arch/evbppc/ev64260: machdep.c
        src/sys/arch/evbppc/pmppc: machdep.c
        src/sys/arch/evbppc/wii: machdep.c
        src/sys/arch/ews4800mips/ews4800mips: machdep.c
        src/sys/arch/hp300/hp300: machdep.c
        src/sys/arch/hpcmips/hpcmips: machdep.c
        src/sys/arch/hpcsh/hpcsh: machdep.c
        src/sys/arch/hppa/hppa: machdep.c
        src/sys/arch/i386/i386: machdep.c
        src/sys/arch/ibmnws/ibmnws: machdep.c
        src/sys/arch/landisk/landisk: machdep.c
        src/sys/arch/luna68k/luna68k: machdep.c
        src/sys/arch/macppc/macppc: machdep.c
        src/sys/arch/mipsco/mipsco: machdep.c
        src/sys/arch/mvme68k/mvme68k: machdep.c
        src/sys/arch/mvmeppc/mvmeppc: machdep.c
        src/sys/arch/news68k/news68k: machdep.c
        src/sys/arch/newsmips/newsmips: machdep.c
        src/sys/arch/next68k/next68k: machdep.c
        src/sys/arch/ofppc/include: autoconf.h
        src/sys/arch/ofppc/ofppc: machdep.c
        src/sys/arch/playstation2/playstation2: machdep.c
        src/sys/arch/pmax/pmax: machdep.c
        src/sys/arch/powerpc/booke: booke_machdep.c
        src/sys/arch/powerpc/ibm4xx: ibm4xx_machdep.c
        src/sys/arch/prep/prep: machdep.c
        src/sys/arch/riscv/riscv: riscv_machdep.c
        src/sys/arch/rs6000/include: autoconf.h
        src/sys/arch/sandpoint/sandpoint: machdep.c
        src/sys/arch/sbmips/sbmips: machdep.c
        src/sys/arch/sgimips/sgimips: machdep.c
        src/sys/arch/sparc/sparc: machdep.c
        src/sys/arch/sparc64/sparc64: machdep.c
        src/sys/arch/vax/vax: machdep.c
        src/sys/arch/virt68k/virt68k: machdep.c
        src/sys/arch/zaurus/zaurus: machdep.c
        src/sys/kern: kern_reboot.c

Log Message:
Move the at-shutdown call to resettodr() from cpu_reboot() to kern_reboot().

It's a small step, but it's a step.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/aarch64/aarch64/aarch64_reboot.c
cvs rdiff -u -r1.57 -r1.58 src/sys/arch/algor/algor/machdep.c
cvs rdiff -u -r1.377 -r1.378 src/sys/arch/alpha/alpha/machdep.c
cvs rdiff -u -r1.367 -r1.368 src/sys/arch/amd64/amd64/machdep.c
cvs rdiff -u -r1.254 -r1.255 src/sys/arch/amiga/amiga/machdep.c
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/amigappc/amigappc/machdep.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/amigappc/include/autoconf.h
cvs rdiff -u -r1.133 -r1.134 src/sys/arch/arc/arc/machdep.c
cvs rdiff -u -r1.146 -r1.147 src/sys/arch/arm/arm32/arm32_machdep.c
cvs rdiff -u -r1.190 -r1.191 src/sys/arch/atari/atari/machdep.c
cvs rdiff -u -r1.109 -r1.110 src/sys/arch/bebox/bebox/machdep.c
cvs rdiff -u -r1.73 -r1.74 src/sys/arch/cesfic/cesfic/machdep.c
cvs rdiff -u -r1.123 -r1.124 src/sys/arch/cobalt/cobalt/machdep.c
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/dreamcast/dreamcast/machdep.c
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/emips/emips/machdep.c
cvs rdiff -u -r1.15 -r1.16 \
    src/sys/arch/evbarm/imx23_olinuxino/imx23_olinuxino_machdep.c
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/evbmips/adm5120/machdep.c
cvs rdiff -u -r1.57 -r1.58 src/sys/arch/evbmips/alchemy/machdep.c
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/evbmips/atheros/machdep.c
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/evbmips/cavium/machdep.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/evbmips/gdium/machdep.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/evbmips/ingenic/machdep.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/evbmips/loongson/machdep.c
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/evbmips/malta/machdep.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbmips/mipssim/machdep.c
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/evbmips/rasoc/machdep.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/evbmips/rmixl/machdep.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbmips/sbmips/machdep.c
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/evbppc/ev64260/machdep.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/evbppc/pmppc/machdep.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/evbppc/wii/machdep.c
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/ews4800mips/ews4800mips/machdep.c
cvs rdiff -u -r1.238 -r1.239 src/sys/arch/hp300/hp300/machdep.c
cvs rdiff -u -r1.125 -r1.126 src/sys/arch/hpcmips/hpcmips/machdep.c
cvs rdiff -u -r1.79 -r1.80 src/sys/arch/hpcsh/hpcsh/machdep.c
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/hppa/hppa/machdep.c
cvs rdiff -u -r1.840 -r1.841 src/sys/arch/i386/i386/machdep.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/ibmnws/ibmnws/machdep.c
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/landisk/landisk/machdep.c
cvs rdiff -u -r1.111 -r1.112 src/sys/arch/luna68k/luna68k/machdep.c
cvs rdiff -u -r1.175 -r1.176 src/sys/arch/macppc/macppc/machdep.c
cvs rdiff -u -r1.81 -r1.82 src/sys/arch/mipsco/mipsco/machdep.c
cvs rdiff -u -r1.164 -r1.165 src/sys/arch/mvme68k/mvme68k/machdep.c
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/mvmeppc/mvmeppc/machdep.c
cvs rdiff -u -r1.114 -r1.115 src/sys/arch/news68k/news68k/machdep.c
cvs rdiff -u -r1.122 -r1.123 src/sys/arch/newsmips/newsmips/machdep.c
cvs rdiff -u -r1.121 -r1.122 src/sys/arch/next68k/next68k/machdep.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/ofppc/include/autoconf.h
cvs rdiff -u -r1.119 -r1.120 src/sys/arch/ofppc/ofppc/machdep.c
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/playstation2/playstation2/machdep.c
cvs rdiff -u -r1.255 -r1.256 src/sys/arch/pmax/pmax/machdep.c
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/powerpc/booke/booke_machdep.c
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c
cvs rdiff -u -r1.78 -r1.79 src/sys/arch/prep/prep/machdep.c
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/riscv/riscv/riscv_machdep.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/rs6000/include/autoconf.h
cvs rdiff -u -r1.69 -r1.70 src/sys/arch/sandpoint/sandpoint/machdep.c
cvs rdiff -u -r1.57 -r1.58 src/sys/arch/sbmips/sbmips/machdep.c
cvs rdiff -u -r1.153 -r1.154 src/sys/arch/sgimips/sgimips/machdep.c
cvs rdiff -u -r1.340 -r1.341 src/sys/arch/sparc/sparc/machdep.c
cvs rdiff -u -r1.307 -r1.308 src/sys/arch/sparc64/sparc64/machdep.c
cvs rdiff -u -r1.198 -r1.199 src/sys/arch/vax/vax/machdep.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/virt68k/virt68k/machdep.c
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/zaurus/zaurus/machdep.c
cvs rdiff -u -r1.4 -r1.5 src/sys/kern/kern_reboot.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/aarch64/aarch64/aarch64_reboot.c
diff -u src/sys/arch/aarch64/aarch64/aarch64_reboot.c:1.4 src/sys/arch/aarch64/aarch64/aarch64_reboot.c:1.5
--- src/sys/arch/aarch64/aarch64/aarch64_reboot.c:1.4	Fri Dec 11 18:03:33 2020
+++ src/sys/arch/aarch64/aarch64/aarch64_reboot.c	Tue Mar  5 14:15:28 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: aarch64_reboot.c,v 1.4 2020/12/11 18:03:33 skrll Exp $	*/
+/*	$NetBSD: aarch64_reboot.c,v 1.5 2024/03/05 14:15:28 thorpej Exp $	*/
 
 /*
  * Copyright (c) 2002, 2003, 2005  Genetec Corporation.  All rights reserved.
@@ -122,7 +122,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: aarch64_reboot.c,v 1.4 2020/12/11 18:03:33 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aarch64_reboot.c,v 1.5 2024/03/05 14:15:28 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -207,8 +207,6 @@ bootsync(void)
 	}
 
 	vfs_shutdown();
-
-	resettodr();
 }
 
 void

Index: src/sys/arch/algor/algor/machdep.c
diff -u src/sys/arch/algor/algor/machdep.c:1.57 src/sys/arch/algor/algor/machdep.c:1.58
--- src/sys/arch/algor/algor/machdep.c:1.57	Mon Aug 17 07:50:41 2020
+++ src/sys/arch/algor/algor/machdep.c	Tue Mar  5 14:15:28 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.57 2020/08/17 07:50:41 simonb Exp $	*/
+/*	$NetBSD: machdep.c,v 1.58 2024/03/05 14:15:28 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.57 2020/08/17 07:50:41 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.58 2024/03/05 14:15:28 thorpej Exp $");
 
 #include "opt_algor_p4032.h"
 #include "opt_algor_p5064.h" 
@@ -559,11 +559,6 @@ cpu_reboot(int howto, char *bootstr)
 	if ((boothowto & RB_NOSYNC) == 0 && waittime < 0) {
 		waittime = 0;
 		vfs_shutdown();
-		/*
-		 * If we've been adjusting the clock, the todr
-		 * will be out of synch; adjust it now.
-		 */
-		resettodr();
 	}
 
 	/* Disable interrupts. */

Index: src/sys/arch/alpha/alpha/machdep.c
diff -u src/sys/arch/alpha/alpha/machdep.c:1.377 src/sys/arch/alpha/alpha/machdep.c:1.378
--- src/sys/arch/alpha/alpha/machdep.c:1.377	Wed Dec 20 20:35:37 2023
+++ src/sys/arch/alpha/alpha/machdep.c	Tue Mar  5 14:15:28 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.377 2023/12/20 20:35:37 andvar Exp $ */
+/* $NetBSD: machdep.c,v 1.378 2024/03/05 14:15:28 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2019, 2020 The NetBSD Foundation, Inc.
@@ -69,7 +69,7 @@
 
 #include <sys/cdefs.h>			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.377 2023/12/20 20:35:37 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.378 2024/03/05 14:15:28 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1058,11 +1058,6 @@ cpu_reboot(int howto, char *bootstr)
 	if ((boothowto & RB_NOSYNC) == 0 && waittime < 0) {
 		waittime = 0;
 		vfs_shutdown();
-		/*
-		 * If we've been adjusting the clock, the todr
-		 * will be out of synch; adjust it now.
-		 */
-		resettodr();
 	}
 
 	/* Disable interrupts. */

Index: src/sys/arch/amd64/amd64/machdep.c
diff -u src/sys/arch/amd64/amd64/machdep.c:1.367 src/sys/arch/amd64/amd64/machdep.c:1.368
--- src/sys/arch/amd64/amd64/machdep.c:1.367	Sun Jul 16 19:55:43 2023
+++ src/sys/arch/amd64/amd64/machdep.c	Tue Mar  5 14:15:28 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.367 2023/07/16 19:55:43 riastradh Exp $	*/
+/*	$NetBSD: machdep.c,v 1.368 2024/03/05 14:15:28 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011
@@ -110,7 +110,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.367 2023/07/16 19:55:43 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.368 2024/03/05 14:15:28 thorpej Exp $");
 
 #include "opt_modular.h"
 #include "opt_user_ldt.h"
@@ -687,15 +687,6 @@ cpu_reboot(int howto, char *bootstr)
 			syncdone = true;
 			/* XXX used to force unmount as well, here */
 			vfs_sync_all(curlwp);
-			/*
-			 * If we've been adjusting the clock, the todr
-			 * will be out of synch; adjust it now.
-			 *
-			 * XXX used to do this after unmounting all
-			 * filesystems with vfs_shutdown().
-			 */
-			if (time_adjusted != 0)
-				resettodr();
 		}
 
 		while (vfs_unmountall1(curlwp, false, false) ||

Index: src/sys/arch/amiga/amiga/machdep.c
diff -u src/sys/arch/amiga/amiga/machdep.c:1.254 src/sys/arch/amiga/amiga/machdep.c:1.255
--- src/sys/arch/amiga/amiga/machdep.c:1.254	Fri Jan 19 18:18:53 2024
+++ src/sys/arch/amiga/amiga/machdep.c	Tue Mar  5 14:15:28 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.254 2024/01/19 18:18:53 thorpej Exp $	*/
+/*	$NetBSD: machdep.c,v 1.255 2024/03/05 14:15:28 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -50,7 +50,7 @@
 #include "empm.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.254 2024/01/19 18:18:53 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.255 2024/03/05 14:15:28 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -394,11 +394,6 @@ bootsync(void)
 	if (waittime < 0) {
 		waittime = 0;
 		vfs_shutdown();
-		/*
-		 * If we've been adjusting the clock, the todr
-		 * will be out of synch; adjust it now.
-		 */
-		resettodr();
 	}
 }
 

Index: src/sys/arch/amigappc/amigappc/machdep.c
diff -u src/sys/arch/amigappc/amigappc/machdep.c:1.53 src/sys/arch/amigappc/amigappc/machdep.c:1.54
--- src/sys/arch/amigappc/amigappc/machdep.c:1.53	Sun Jul 15 05:16:41 2018
+++ src/sys/arch/amigappc/amigappc/machdep.c	Tue Mar  5 14:15:28 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.53 2018/07/15 05:16:41 maxv Exp $ */
+/* $NetBSD: machdep.c,v 1.54 2024/03/05 14:15:28 thorpej Exp $ */
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.53 2018/07/15 05:16:41 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.54 2024/03/05 14:15:28 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -665,7 +665,6 @@ cpu_reboot(int howto, char *what)
 	if ((howto & RB_NOSYNC) == 0 && syncing == 0) {
 		syncing = 1;
 		vfs_shutdown();		/* sync */
-		resettodr();		/* set wall clock */
 	}
 
 	/* Disable intr */

Index: src/sys/arch/amigappc/include/autoconf.h
diff -u src/sys/arch/amigappc/include/autoconf.h:1.1 src/sys/arch/amigappc/include/autoconf.h:1.2
--- src/sys/arch/amigappc/include/autoconf.h:1.1	Tue Jul 21 09:49:15 2009
+++ src/sys/arch/amigappc/include/autoconf.h	Tue Mar  5 14:15:28 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.h,v 1.1 2009/07/21 09:49:15 phx Exp $	*/
+/*	$NetBSD: autoconf.h,v 1.2 2024/03/05 14:15:28 thorpej Exp $	*/
 
 /*-
  * Copyright (C) 1998	Internet Research Institute, Inc.
@@ -37,8 +37,6 @@
 #ifdef _KERNEL
 void initppc(u_int, u_int);
 
-void inittodr (time_t);
-void resettodr (void);
 void cpu_initclocks (void);
 void decr_intr (struct clockframe *);
 void setstatclockrate (int);

Index: src/sys/arch/arc/arc/machdep.c
diff -u src/sys/arch/arc/arc/machdep.c:1.133 src/sys/arch/arc/arc/machdep.c:1.134
--- src/sys/arch/arc/arc/machdep.c:1.133	Wed Dec 20 06:36:02 2023
+++ src/sys/arch/arc/arc/machdep.c	Tue Mar  5 14:15:28 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.133 2023/12/20 06:36:02 thorpej Exp $	*/
+/*	$NetBSD: machdep.c,v 1.134 2024/03/05 14:15:28 thorpej Exp $	*/
 /*	$OpenBSD: machdep.c,v 1.36 1999/05/22 21:22:19 weingart Exp $	*/
 
 /*
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.133 2023/12/20 06:36:02 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.134 2024/03/05 14:15:28 thorpej Exp $");
 
 #include "opt_ddb.h"
 #include "opt_ddbparam.h"
@@ -540,12 +540,6 @@ cpu_reboot(int howto, char *bootstr)
 		 */
 		waittime = 0;
 		vfs_shutdown();
-
-		/*
-		 * If we've been adjusting the clock, the todr
-		 * will be out of synch; adjust it now.
-		 */
-		resettodr();
 	}
 	(void)splhigh();		/* extreme priority */
 

Index: src/sys/arch/arm/arm32/arm32_machdep.c
diff -u src/sys/arch/arm/arm32/arm32_machdep.c:1.146 src/sys/arch/arm/arm32/arm32_machdep.c:1.147
--- src/sys/arch/arm/arm32/arm32_machdep.c:1.146	Fri Apr  7 08:55:30 2023
+++ src/sys/arch/arm/arm32/arm32_machdep.c	Tue Mar  5 14:15:29 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: arm32_machdep.c,v 1.146 2023/04/07 08:55:30 skrll Exp $	*/
+/*	$NetBSD: arm32_machdep.c,v 1.147 2024/03/05 14:15:29 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1994-1998 Mark Brinicombe.
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: arm32_machdep.c,v 1.146 2023/04/07 08:55:30 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arm32_machdep.c,v 1.147 2024/03/05 14:15:29 thorpej Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_arm_start.h"
@@ -270,8 +270,6 @@ bootsync(void)
 	}
 
 	vfs_shutdown();
-
-	resettodr();
 }
 
 /*

Index: src/sys/arch/atari/atari/machdep.c
diff -u src/sys/arch/atari/atari/machdep.c:1.190 src/sys/arch/atari/atari/machdep.c:1.191
--- src/sys/arch/atari/atari/machdep.c:1.190	Tue Feb 13 21:39:02 2024
+++ src/sys/arch/atari/atari/machdep.c	Tue Mar  5 14:15:29 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.190 2024/02/13 21:39:02 andvar Exp $	*/
+/*	$NetBSD: machdep.c,v 1.191 2024/03/05 14:15:29 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.190 2024/02/13 21:39:02 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.191 2024/03/05 14:15:29 thorpej Exp $");
 
 #include "opt_ddb.h"
 #include "opt_compat_netbsd.h"
@@ -296,17 +296,9 @@ static int waittime = -1;
 static void
 bootsync(void)
 {
-
 	if (waittime < 0) {
 		waittime = 0;
-
 		vfs_shutdown();
-
-		/*
-		 * If we've been adjusting the clock, the todr
-		 * will be out of synch; adjust it now.
-		 */
-		resettodr();
 	}
 }
 

Index: src/sys/arch/bebox/bebox/machdep.c
diff -u src/sys/arch/bebox/bebox/machdep.c:1.109 src/sys/arch/bebox/bebox/machdep.c:1.110
--- src/sys/arch/bebox/bebox/machdep.c:1.109	Sat Feb 27 01:31:24 2021
+++ src/sys/arch/bebox/bebox/machdep.c	Tue Mar  5 14:15:29 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.109 2021/02/27 01:31:24 thorpej Exp $	*/
+/*	$NetBSD: machdep.c,v 1.110 2024/03/05 14:15:29 thorpej Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.109 2021/02/27 01:31:24 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.110 2024/03/05 14:15:29 thorpej Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_ddb.h"
@@ -289,7 +289,6 @@ cpu_reboot(int howto, char *what)
 	if (!cold && !(howto & RB_NOSYNC) && !syncing) {
 		syncing = 1;
 		vfs_shutdown();		/* sync */
-		resettodr();		/* set wall clock */
 	}
 	splhigh();
 	if (howto & RB_HALT) {

Index: src/sys/arch/cesfic/cesfic/machdep.c
diff -u src/sys/arch/cesfic/cesfic/machdep.c:1.73 src/sys/arch/cesfic/cesfic/machdep.c:1.74
--- src/sys/arch/cesfic/cesfic/machdep.c:1.73	Wed Dec 20 00:40:43 2023
+++ src/sys/arch/cesfic/cesfic/machdep.c	Tue Mar  5 14:15:29 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.73 2023/12/20 00:40:43 thorpej Exp $	*/
+/*	$NetBSD: machdep.c,v 1.74 2024/03/05 14:15:29 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.73 2023/12/20 00:40:43 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.74 2024/03/05 14:15:29 thorpej Exp $");
 
 #include "opt_bufcache.h"
 #include "opt_ddb.h"
@@ -313,11 +313,6 @@ cpu_reboot(int howto, char *bootstr)
 	if ((howto & RB_NOSYNC) == 0 && waittime < 0) {
 		waittime = 0;
 		vfs_shutdown();
-		/*
-		 * If we've been adjusting the clock, the todr
-		 * will be out of synch; adjust it now.
-		 */
-		resettodr();
 	}
 
 	/* Disable interrupts. */

Index: src/sys/arch/cobalt/cobalt/machdep.c
diff -u src/sys/arch/cobalt/cobalt/machdep.c:1.123 src/sys/arch/cobalt/cobalt/machdep.c:1.124
--- src/sys/arch/cobalt/cobalt/machdep.c:1.123	Mon May 23 19:52:34 2022
+++ src/sys/arch/cobalt/cobalt/machdep.c	Tue Mar  5 14:15:29 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.123 2022/05/23 19:52:34 andvar Exp $	*/
+/*	$NetBSD: machdep.c,v 1.124 2024/03/05 14:15:29 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2006 Izumi Tsutsui.  All rights reserved.
@@ -50,7 +50,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.123 2022/05/23 19:52:34 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.124 2024/03/05 14:15:29 thorpej Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -352,12 +352,6 @@ cpu_reboot(int howto, char *bootstr)
 	if ((howto & RB_NOSYNC) == 0 && (waittime < 0)) {
 		waittime = 0;
 		vfs_shutdown();
-
-		/*
-		 * If we've been adjusting the clock, the todr
-		 * will be out of synch; adjust it now.
-		 */
-		resettodr();
 	}
 
 	splhigh();

Index: src/sys/arch/dreamcast/dreamcast/machdep.c
diff -u src/sys/arch/dreamcast/dreamcast/machdep.c:1.46 src/sys/arch/dreamcast/dreamcast/machdep.c:1.47
--- src/sys/arch/dreamcast/dreamcast/machdep.c:1.46	Mon Feb  5 22:08:04 2024
+++ src/sys/arch/dreamcast/dreamcast/machdep.c	Tue Mar  5 14:15:29 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.46 2024/02/05 22:08:04 andvar Exp $	*/
+/*	$NetBSD: machdep.c,v 1.47 2024/03/05 14:15:29 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2002 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.46 2024/02/05 22:08:04 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.47 2024/03/05 14:15:29 thorpej Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -224,13 +224,6 @@ cpu_reboot(int howto, char *bootstr)
 	if ((howto & RB_NOSYNC) == 0 && waittime < 0) {
 		waittime = 0;
 		vfs_shutdown();
-		/*
-		 * If we've been adjusting the clock, the todr
-		 * will be out of synch; adjust it now.
-		 */
-#if 0
-		resettodr();
-#endif
 	}
 
 	/* Disable interrupts. */

Index: src/sys/arch/emips/emips/machdep.c
diff -u src/sys/arch/emips/emips/machdep.c:1.19 src/sys/arch/emips/emips/machdep.c:1.20
--- src/sys/arch/emips/emips/machdep.c:1.19	Mon Jan 15 19:44:06 2024
+++ src/sys/arch/emips/emips/machdep.c	Tue Mar  5 14:15:29 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.19 2024/01/15 19:44:06 andvar Exp $	*/
+/*	$NetBSD: machdep.c,v 1.20 2024/03/05 14:15:29 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.19 2024/01/15 19:44:06 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.20 2024/03/05 14:15:29 thorpej Exp $");
 
 #include "opt_ddb.h"
 
@@ -518,12 +518,6 @@ cpu_reboot(volatile int howto,	/* XXX vo
 		 * Synchronize the disks....
 		 */
 		vfs_shutdown();
-
-		/*
-		 * If we've been adjusting the clock, the todr
-		 * will be out of synch; adjust it now.
-		 */
-		resettodr();
 	}
 
 	/* Disable interrupts. */

Index: src/sys/arch/evbarm/imx23_olinuxino/imx23_olinuxino_machdep.c
diff -u src/sys/arch/evbarm/imx23_olinuxino/imx23_olinuxino_machdep.c:1.15 src/sys/arch/evbarm/imx23_olinuxino/imx23_olinuxino_machdep.c:1.16
--- src/sys/arch/evbarm/imx23_olinuxino/imx23_olinuxino_machdep.c:1.15	Fri Apr 21 14:58:35 2023
+++ src/sys/arch/evbarm/imx23_olinuxino/imx23_olinuxino_machdep.c	Tue Mar  5 14:15:29 2024
@@ -1,4 +1,4 @@
-/* $Id: imx23_olinuxino_machdep.c,v 1.15 2023/04/21 14:58:35 skrll Exp $ */
+/* $Id: imx23_olinuxino_machdep.c,v 1.16 2024/03/05 14:15:29 thorpej Exp $ */
 
 /*
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -220,7 +220,6 @@ cpu_reboot(int howto, char *bootstr)
 	 */
 	if (!cpu_reboot_called && !(boothowto & RB_NOSYNC)) {
 		vfs_shutdown();
-		resettodr();
 	}
 
 	cpu_reboot_called = 1;

Index: src/sys/arch/evbmips/adm5120/machdep.c
diff -u src/sys/arch/evbmips/adm5120/machdep.c:1.26 src/sys/arch/evbmips/adm5120/machdep.c:1.27
--- src/sys/arch/evbmips/adm5120/machdep.c:1.26	Wed Jul 22 01:24:39 2020
+++ src/sys/arch/evbmips/adm5120/machdep.c	Tue Mar  5 14:15:30 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.26 2020/07/22 01:24:39 msaitoh Exp $ */
+/* $NetBSD: machdep.c,v 1.27 2024/03/05 14:15:30 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko.
@@ -70,7 +70,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.26 2020/07/22 01:24:39 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.27 2024/03/05 14:15:30 thorpej Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -450,12 +450,6 @@ cpu_reboot(int howto, char *bootstr)
 		 * Synchronize the disks....
 		 */
 		vfs_shutdown();
-
-		/*
-		 * If we've been adjusting the clock, the todr
-		 * will be out of synch; adjust it now.
-		 */
-		resettodr();
 	}
 
 	/* Disable interrupts. */

Index: src/sys/arch/evbmips/alchemy/machdep.c
diff -u src/sys/arch/evbmips/alchemy/machdep.c:1.57 src/sys/arch/evbmips/alchemy/machdep.c:1.58
--- src/sys/arch/evbmips/alchemy/machdep.c:1.57	Wed Jul 22 01:24:39 2020
+++ src/sys/arch/evbmips/alchemy/machdep.c	Tue Mar  5 14:15:30 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.57 2020/07/22 01:24:39 msaitoh Exp $ */
+/* $NetBSD: machdep.c,v 1.58 2024/03/05 14:15:30 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2006 Itronix Inc.
@@ -70,7 +70,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.57 2020/07/22 01:24:39 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.58 2024/03/05 14:15:30 thorpej Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -374,12 +374,6 @@ cpu_reboot(int howto, char *bootstr)
 		 * Synchronize the disks....
 		 */
 		vfs_shutdown();
-
-		/*
-		 * If we've been adjusting the clock, the todr
-		 * will be out of synch; adjust it now.
-		 */
-		resettodr();
 	}
 
 	/* Disable interrupts. */

Index: src/sys/arch/evbmips/atheros/machdep.c
diff -u src/sys/arch/evbmips/atheros/machdep.c:1.33 src/sys/arch/evbmips/atheros/machdep.c:1.34
--- src/sys/arch/evbmips/atheros/machdep.c:1.33	Mon Aug 17 07:50:42 2020
+++ src/sys/arch/evbmips/atheros/machdep.c	Tue Mar  5 14:15:30 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.33 2020/08/17 07:50:42 simonb Exp $ */
+/* $NetBSD: machdep.c,v 1.34 2024/03/05 14:15:30 thorpej Exp $ */
 
 /*
  * Copyright (c) 2006 Urbana-Champaign Independent Media Center.
@@ -110,7 +110,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.33 2020/08/17 07:50:42 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.34 2024/03/05 14:15:30 thorpej Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -336,12 +336,6 @@ cpu_reboot(int howto, char *bootstr)
 		 * Synchronize the disks....
 		 */
 		vfs_shutdown();
-
-		/*
-		 * If we've been adjusting the clock, the todr
-		 * will be out of synch; adjust it now.
-		 */
-		resettodr();
 	}
 
 	/* Disable interrupts. */

Index: src/sys/arch/evbmips/cavium/machdep.c
diff -u src/sys/arch/evbmips/cavium/machdep.c:1.24 src/sys/arch/evbmips/cavium/machdep.c:1.25
--- src/sys/arch/evbmips/cavium/machdep.c:1.24	Wed May  5 06:46:37 2021
+++ src/sys/arch/evbmips/cavium/machdep.c	Tue Mar  5 14:15:30 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.24 2021/05/05 06:46:37 simonb Exp $	*/
+/*	$NetBSD: machdep.c,v 1.25 2024/03/05 14:15:30 thorpej Exp $	*/
 
 /*
  * Copyright 2001, 2002 Wasabi Systems, Inc.
@@ -114,7 +114,7 @@
 #include "opt_multiprocessor.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.24 2021/05/05 06:46:37 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.25 2024/03/05 14:15:30 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -497,12 +497,6 @@ cpu_reboot(int howto, char *bootstr)
 	if ((howto & RB_NOSYNC) == 0 && (waittime < 0)) {
 		waittime = 0;
 		vfs_shutdown();
-
-		/*
-		 * If we've been adjusting the clock, the todr
-		 * will be out of synch; adjust it now.
-		 */
-		resettodr();
 	}
 
 	splhigh();

Index: src/sys/arch/evbmips/gdium/machdep.c
diff -u src/sys/arch/evbmips/gdium/machdep.c:1.21 src/sys/arch/evbmips/gdium/machdep.c:1.22
--- src/sys/arch/evbmips/gdium/machdep.c:1.21	Mon Aug 17 07:50:42 2020
+++ src/sys/arch/evbmips/gdium/machdep.c	Tue Mar  5 14:15:30 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.21 2020/08/17 07:50:42 simonb Exp $	*/
+/*	$NetBSD: machdep.c,v 1.22 2024/03/05 14:15:30 thorpej Exp $	*/
 
 /*
  * Copyright 2001, 2002 Wasabi Systems, Inc.
@@ -74,7 +74,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.21 2020/08/17 07:50:42 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.22 2024/03/05 14:15:30 thorpej Exp $");
 
 #include "opt_ddb.h"
 #include "opt_execfmt.h"
@@ -415,12 +415,6 @@ cpu_reboot(int howto, char *bootstr)
 	if ((howto & RB_NOSYNC) == 0 && (waittime < 0)) {
 		waittime = 0;
 		vfs_shutdown();
-
-		/*
-		 * If we've been adjusting the clock, the todr
-		 * will be out of synch; adjust it now.
-		 */
-		resettodr();
 	}
 
 	splhigh();

Index: src/sys/arch/evbmips/ingenic/machdep.c
diff -u src/sys/arch/evbmips/ingenic/machdep.c:1.16 src/sys/arch/evbmips/ingenic/machdep.c:1.17
--- src/sys/arch/evbmips/ingenic/machdep.c:1.16	Mon Aug 17 07:50:42 2020
+++ src/sys/arch/evbmips/ingenic/machdep.c	Tue Mar  5 14:15:30 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.16 2020/08/17 07:50:42 simonb Exp $ */
+/*	$NetBSD: machdep.c,v 1.17 2024/03/05 14:15:30 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2014 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.16 2020/08/17 07:50:42 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.17 2024/03/05 14:15:30 thorpej Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -292,12 +292,6 @@ cpu_reboot(int howto, char *bootstr)
 		 * Synchronize the disks....
 		 */
 		vfs_shutdown();
-
-		/*
-		 * If we've been adjusting the clock, the todr
-		 * will be out of synch; adjust it now.
-		 */
-		resettodr();
 	}
 
 	/* Disable interrupts. */

Index: src/sys/arch/evbmips/loongson/machdep.c
diff -u src/sys/arch/evbmips/loongson/machdep.c:1.8 src/sys/arch/evbmips/loongson/machdep.c:1.9
--- src/sys/arch/evbmips/loongson/machdep.c:1.8	Mon Aug 17 07:50:42 2020
+++ src/sys/arch/evbmips/loongson/machdep.c	Tue Mar  5 14:15:30 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.8 2020/08/17 07:50:42 simonb Exp $	*/
+/*	$NetBSD: machdep.c,v 1.9 2024/03/05 14:15:30 thorpej Exp $	*/
 
 /*
  * Copyright 2001, 2002 Wasabi Systems, Inc.
@@ -90,7 +90,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.8 2020/08/17 07:50:42 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.9 2024/03/05 14:15:30 thorpej Exp $");
 
 #include "opt_ddb.h"
 #include "opt_execfmt.h"
@@ -724,12 +724,6 @@ cpu_reboot(int howto, char *bootstr)
 	if ((howto & RB_NOSYNC) == 0 && (waittime < 0)) {
 		waittime = 0;
 		vfs_shutdown();
-
-		/*
-		 * If we've been adjusting the clock, the todr
-		 * will be out of synch; adjust it now.
-		 */
-		resettodr();
 	}
 
 	splhigh();

Index: src/sys/arch/evbmips/malta/machdep.c
diff -u src/sys/arch/evbmips/malta/machdep.c:1.46 src/sys/arch/evbmips/malta/machdep.c:1.47
--- src/sys/arch/evbmips/malta/machdep.c:1.46	Thu Dec 22 14:47:57 2016
+++ src/sys/arch/evbmips/malta/machdep.c	Tue Mar  5 14:15:30 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.46 2016/12/22 14:47:57 cherry Exp $	*/
+/*	$NetBSD: machdep.c,v 1.47 2024/03/05 14:15:30 thorpej Exp $	*/
 
 /*
  * Copyright 2001, 2002 Wasabi Systems, Inc.
@@ -74,7 +74,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.46 2016/12/22 14:47:57 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.47 2024/03/05 14:15:30 thorpej Exp $");
 
 #include "opt_ddb.h"
 #include "opt_execfmt.h"
@@ -335,12 +335,6 @@ cpu_reboot(int howto, char *bootstr)
 	if ((howto & RB_NOSYNC) == 0 && (waittime < 0)) {
 		waittime = 0;
 		vfs_shutdown();
-
-		/*
-		 * If we've been adjusting the clock, the todr
-		 * will be out of synch; adjust it now.
-		 */
-		resettodr();
 	}
 
 	splhigh();

Index: src/sys/arch/evbmips/mipssim/machdep.c
diff -u src/sys/arch/evbmips/mipssim/machdep.c:1.4 src/sys/arch/evbmips/mipssim/machdep.c:1.5
--- src/sys/arch/evbmips/mipssim/machdep.c:1.4	Wed Dec 28 11:50:25 2022
+++ src/sys/arch/evbmips/mipssim/machdep.c	Tue Mar  5 14:15:31 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.4 2022/12/28 11:50:25 he Exp $ */
+/* $NetBSD: machdep.c,v 1.5 2024/03/05 14:15:31 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2001,2021 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.4 2022/12/28 11:50:25 he Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.5 2024/03/05 14:15:31 thorpej Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -335,12 +335,6 @@ cpu_reboot(int howto, char *bootstr)
 		 * Synchronize the disks....
 		 */
 		vfs_shutdown();
-
-		/*
-		 * If we've been adjusting the clock, the todr
-		 * will be out of synch; adjust it now.
-		 */
-		resettodr();
 	}
 
 	/* Disable interrupts. */

Index: src/sys/arch/evbmips/rasoc/machdep.c
diff -u src/sys/arch/evbmips/rasoc/machdep.c:1.14 src/sys/arch/evbmips/rasoc/machdep.c:1.15
--- src/sys/arch/evbmips/rasoc/machdep.c:1.14	Wed Jul 22 01:24:39 2020
+++ src/sys/arch/evbmips/rasoc/machdep.c	Tue Mar  5 14:15:31 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.14 2020/07/22 01:24:39 msaitoh Exp $	*/
+/*	$NetBSD: machdep.c,v 1.15 2024/03/05 14:15:31 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2011 CradlePoint Technology, Inc.
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>			/* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.14 2020/07/22 01:24:39 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.15 2024/03/05 14:15:31 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/boot_flag.h>
@@ -244,12 +244,6 @@ cpu_reboot(int howto, char *bootstr)
 		 * Synchronize the disks....
 		 */
 		vfs_shutdown();
-
-		/*
-		 * If we've been adjusting the clock, the todr
-		 * will be out of synch; adjust it now.
-		 */
-		resettodr();
 	}
 
 	/* Disable interrupts. */

Index: src/sys/arch/evbmips/rmixl/machdep.c
diff -u src/sys/arch/evbmips/rmixl/machdep.c:1.21 src/sys/arch/evbmips/rmixl/machdep.c:1.22
--- src/sys/arch/evbmips/rmixl/machdep.c:1.21	Wed Dec 20 14:12:25 2023
+++ src/sys/arch/evbmips/rmixl/machdep.c	Tue Mar  5 14:15:31 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.21 2023/12/20 14:12:25 thorpej Exp $	*/
+/*	$NetBSD: machdep.c,v 1.22 2024/03/05 14:15:31 thorpej Exp $	*/
 
 /*
  * Copyright 2001, 2002 Wasabi Systems, Inc.
@@ -74,7 +74,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.21 2023/12/20 14:12:25 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.22 2024/03/05 14:15:31 thorpej Exp $");
 
 #define __INTR_PRIVATE
 
@@ -1008,12 +1008,6 @@ cpu_reboot(int howto, char *bootstr)
 	if ((howto & RB_NOSYNC) == 0 && (waittime < 0)) {
 		waittime = 0;
 		vfs_shutdown();
-
-		/*
-		 * If we've been adjusting the clock, the todr
-		 * will be out of synch; adjust it now.
-		 */
-		resettodr();
 	}
 
 	splhigh();

Index: src/sys/arch/evbmips/sbmips/machdep.c
diff -u src/sys/arch/evbmips/sbmips/machdep.c:1.7 src/sys/arch/evbmips/sbmips/machdep.c:1.8
--- src/sys/arch/evbmips/sbmips/machdep.c:1.7	Wed Dec 20 14:12:26 2023
+++ src/sys/arch/evbmips/sbmips/machdep.c	Tue Mar  5 14:15:31 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.7 2023/12/20 14:12:26 thorpej Exp $ */
+/* $NetBSD: machdep.c,v 1.8 2024/03/05 14:15:31 thorpej Exp $ */
 
 /*
  * Copyright 2000, 2001
@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.7 2023/12/20 14:12:26 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.8 2024/03/05 14:15:31 thorpej Exp $");
 
 #include "opt_ddb.h"
 #include "opt_execfmt.h"
@@ -371,12 +371,6 @@ cpu_reboot(int howto, char *bootstr)
 	if ((howto & RB_NOSYNC) == 0 && (waittime < 0)) {
 		waittime = 0;
 		vfs_shutdown();
-
-		/*
-		 * If we've been adjusting the clock, the todr
-		 * will be out of synch; adjust it now.
-		 */
-		resettodr();
 	}
 
 	splhigh();

Index: src/sys/arch/evbppc/ev64260/machdep.c
diff -u src/sys/arch/evbppc/ev64260/machdep.c:1.34 src/sys/arch/evbppc/ev64260/machdep.c:1.35
--- src/sys/arch/evbppc/ev64260/machdep.c:1.34	Thu Mar  4 03:13:54 2021
+++ src/sys/arch/evbppc/ev64260/machdep.c	Tue Mar  5 14:15:31 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.34 2021/03/04 03:13:54 thorpej Exp $	*/
+/*	$NetBSD: machdep.c,v 1.35 2024/03/05 14:15:31 thorpej Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.34 2021/03/04 03:13:54 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.35 2024/03/05 14:15:31 thorpej Exp $");
 
 #include "opt_marvell.h"
 #include "opt_modular.h"
@@ -334,7 +334,6 @@ cpu_reboot(int howto, char *what)
 	if (!cold && !(howto & RB_NOSYNC) && !syncing) {
 		syncing = 1;
 		vfs_shutdown();		/* sync */
-		resettodr();		/* set wall clock */
 	}
 	splhigh();
 	if (howto & RB_HALT) {

Index: src/sys/arch/evbppc/pmppc/machdep.c
diff -u src/sys/arch/evbppc/pmppc/machdep.c:1.15 src/sys/arch/evbppc/pmppc/machdep.c:1.16
--- src/sys/arch/evbppc/pmppc/machdep.c:1.15	Wed Dec 20 14:18:37 2023
+++ src/sys/arch/evbppc/pmppc/machdep.c	Tue Mar  5 14:15:31 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.15 2023/12/20 14:18:37 thorpej Exp $	*/
+/*	$NetBSD: machdep.c,v 1.16 2024/03/05 14:15:31 thorpej Exp $	*/
 
 /*
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.15 2023/12/20 14:18:37 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.16 2024/03/05 14:15:31 thorpej Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_ddb.h"
@@ -336,7 +336,6 @@ cpu_reboot(int howto, char *what)
 	if (!cold && !(howto & RB_NOSYNC) && !syncing) {
 		syncing = 1;
 		vfs_shutdown();		/* sync */
-		resettodr();		/* set wall clock */
 	}
 	splhigh();
 	if (howto & RB_HALT) {

Index: src/sys/arch/evbppc/wii/machdep.c
diff -u src/sys/arch/evbppc/wii/machdep.c:1.5 src/sys/arch/evbppc/wii/machdep.c:1.6
--- src/sys/arch/evbppc/wii/machdep.c:1.5	Sat Feb 10 17:41:00 2024
+++ src/sys/arch/evbppc/wii/machdep.c	Tue Mar  5 14:15:31 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.5 2024/02/10 17:41:00 jmcneill Exp $ */
+/* $NetBSD: machdep.c,v 1.6 2024/03/05 14:15:31 thorpej Exp $ */
 
 /*
  * Copyright (c) 2002, 2024 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
 #define _POWERPC_BUS_DMA_PRIVATE
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.5 2024/02/10 17:41:00 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.6 2024/03/05 14:15:31 thorpej Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_ddb.h"
@@ -373,7 +373,6 @@ cpu_reboot(int howto, char *what)
 	if (!cold && !(howto & RB_NOSYNC) && !syncing) {
 		syncing = 1;
 		vfs_shutdown();		/* sync */
-		resettodr();		/* set wall clock */
 	}
 	splhigh();
 	if (!cold && (howto & RB_DUMP)) {

Index: src/sys/arch/ews4800mips/ews4800mips/machdep.c
diff -u src/sys/arch/ews4800mips/ews4800mips/machdep.c:1.32 src/sys/arch/ews4800mips/ews4800mips/machdep.c:1.33
--- src/sys/arch/ews4800mips/ews4800mips/machdep.c:1.32	Tue Nov  1 19:24:30 2022
+++ src/sys/arch/ews4800mips/ews4800mips/machdep.c	Tue Mar  5 14:15:31 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.32 2022/11/01 19:24:30 andvar Exp $	*/
+/*	$NetBSD: machdep.c,v 1.33 2024/03/05 14:15:31 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2004, 2005 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.32 2022/11/01 19:24:30 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.33 2024/03/05 14:15:31 thorpej Exp $");
 
 #include "opt_ddb.h"
 
@@ -255,12 +255,6 @@ cpu_reboot(int howto, char *bootstr)
 	if ((howto & RB_NOSYNC) == 0 && (waittime < 0)) {
 		waittime = 0;
 		vfs_shutdown();
-
-		/*
-		 * If we've been adjusting the clock, the todr
-		 * will be out of synch; adjust it now.
-		 */
-		resettodr();
 	}
 
 	splhigh();

Index: src/sys/arch/hp300/hp300/machdep.c
diff -u src/sys/arch/hp300/hp300/machdep.c:1.238 src/sys/arch/hp300/hp300/machdep.c:1.239
--- src/sys/arch/hp300/hp300/machdep.c:1.238	Sun Jan 15 06:19:46 2023
+++ src/sys/arch/hp300/hp300/machdep.c	Tue Mar  5 14:15:32 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.238 2023/01/15 06:19:46 tsutsui Exp $	*/
+/*	$NetBSD: machdep.c,v 1.239 2024/03/05 14:15:32 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.238 2023/01/15 06:19:46 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.239 2024/03/05 14:15:32 thorpej Exp $");
 
 #include "opt_ddb.h"
 #include "opt_compat_netbsd.h"
@@ -589,11 +589,6 @@ cpu_reboot(int howto, char *bootstr)
 	if ((howto & RB_NOSYNC) == 0 && waittime < 0) {
 		waittime = 0;
 		vfs_shutdown();
-		/*
-		 * If we've been adjusting the clock, the todr
-		 * will be out of synch; adjust it now.
-		 */
-		resettodr();
 	}
 
 	/* Disable interrupts. */

Index: src/sys/arch/hpcmips/hpcmips/machdep.c
diff -u src/sys/arch/hpcmips/hpcmips/machdep.c:1.125 src/sys/arch/hpcmips/hpcmips/machdep.c:1.126
--- src/sys/arch/hpcmips/hpcmips/machdep.c:1.125	Mon Sep  3 16:29:24 2018
+++ src/sys/arch/hpcmips/hpcmips/machdep.c	Tue Mar  5 14:15:32 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.125 2018/09/03 16:29:24 riastradh Exp $	*/
+/*	$NetBSD: machdep.c,v 1.126 2024/03/05 14:15:32 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 1999 Shin Takemura, All rights reserved.
@@ -69,7 +69,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.125 2018/09/03 16:29:24 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.126 2024/03/05 14:15:32 thorpej Exp $");
 
 #include "opt_vr41xx.h"
 #include "opt_tx39xx.h"
@@ -527,12 +527,6 @@ cpu_reboot(int howto, char *bootstr)
 		 * Synchronize the disks....
 		 */
 		vfs_shutdown();
-
-		/*
-		 * If we've been adjusting the clock, the todr
-		 * will be out of synch; adjust it now.
-		 */
-		resettodr();
 	}
 
 	/* Disable interrupts. */

Index: src/sys/arch/hpcsh/hpcsh/machdep.c
diff -u src/sys/arch/hpcsh/hpcsh/machdep.c:1.79 src/sys/arch/hpcsh/hpcsh/machdep.c:1.80
--- src/sys/arch/hpcsh/hpcsh/machdep.c:1.79	Mon Feb  5 22:08:05 2024
+++ src/sys/arch/hpcsh/hpcsh/machdep.c	Tue Mar  5 14:15:32 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.79 2024/02/05 22:08:05 andvar Exp $	*/
+/*	$NetBSD: machdep.c,v 1.80 2024/03/05 14:15:32 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002, 2004 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.79 2024/02/05 22:08:05 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.80 2024/03/05 14:15:32 thorpej Exp $");
 
 #include "opt_md.h"
 #include "opt_ddb.h"
@@ -395,12 +395,6 @@ cpu_reboot(int howto, char *bootstr)
 		 * Synchronize the disks....
 		 */
 		vfs_shutdown();
-
-		/*
-		 * If we've been adjusting the clock, the todr
-		 * will be out of synch; adjust it now.
-		 */
-		resettodr();
 	}
 
 	/* Disable interrupts. */

Index: src/sys/arch/hppa/hppa/machdep.c
diff -u src/sys/arch/hppa/hppa/machdep.c:1.19 src/sys/arch/hppa/hppa/machdep.c:1.20
--- src/sys/arch/hppa/hppa/machdep.c:1.19	Mon Jan 22 07:15:25 2024
+++ src/sys/arch/hppa/hppa/machdep.c	Tue Mar  5 14:15:32 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.19 2024/01/22 07:15:25 skrll Exp $	*/
+/*	$NetBSD: machdep.c,v 1.20 2024/03/05 14:15:32 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.19 2024/01/22 07:15:25 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.20 2024/03/05 14:15:32 thorpej Exp $");
 
 #include "opt_cputype.h"
 #include "opt_ddb.h"
@@ -1395,12 +1395,6 @@ cpu_reboot(int howto, char *user_boot_st
 	if (!(howto & RB_NOSYNC) && waittime < 0) {
 		waittime = 0;
 		vfs_shutdown();
-
-		/*
-		 * If we've been adjusting the clock, the todr
-		 * will be out of synch; adjust it now.
-		 */
-		resettodr();
 	}
 
 	/* XXX probably save howto into stable storage */

Index: src/sys/arch/i386/i386/machdep.c
diff -u src/sys/arch/i386/i386/machdep.c:1.840 src/sys/arch/i386/i386/machdep.c:1.841
--- src/sys/arch/i386/i386/machdep.c:1.840	Sun Jul 16 19:55:43 2023
+++ src/sys/arch/i386/i386/machdep.c	Tue Mar  5 14:15:32 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.840 2023/07/16 19:55:43 riastradh Exp $	*/
+/*	$NetBSD: machdep.c,v 1.841 2024/03/05 14:15:32 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008, 2009, 2017
@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.840 2023/07/16 19:55:43 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.841 2024/03/05 14:15:32 thorpej Exp $");
 
 #include "opt_beep.h"
 #include "opt_compat_freebsd.h"
@@ -754,15 +754,6 @@ cpu_reboot(int howto, char *bootstr)
 			syncdone = true;
 			/* XXX used to force unmount as well, here */
 			vfs_sync_all(curlwp);
-			/*
-			 * If we've been adjusting the clock, the todr
-			 * will be out of synch; adjust it now.
-			 *
-			 * XXX used to do this after unmounting all
-			 * filesystems with vfs_shutdown().
-			 */
-			if (time_adjusted != 0)
-				resettodr();
 		}
 
 		while (vfs_unmountall1(curlwp, false, false) ||

Index: src/sys/arch/ibmnws/ibmnws/machdep.c
diff -u src/sys/arch/ibmnws/ibmnws/machdep.c:1.21 src/sys/arch/ibmnws/ibmnws/machdep.c:1.22
--- src/sys/arch/ibmnws/ibmnws/machdep.c:1.21	Wed Dec 20 15:00:08 2023
+++ src/sys/arch/ibmnws/ibmnws/machdep.c	Tue Mar  5 14:15:32 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.21 2023/12/20 15:00:08 thorpej Exp $	*/
+/*	$NetBSD: machdep.c,v 1.22 2024/03/05 14:15:32 thorpej Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.21 2023/12/20 15:00:08 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.22 2024/03/05 14:15:32 thorpej Exp $");
 
 #include "opt_compat_netbsd.h"
 
@@ -209,7 +209,6 @@ cpu_reboot(int howto, char *what)
 	if ((howto & RB_NOSYNC) == 0 && syncing == 0) {
 		syncing = 1;
 		vfs_shutdown();		/* sync */
-		resettodr();		/* set wall clock */
 	}
 
 	/* Disable intr */

Index: src/sys/arch/landisk/landisk/machdep.c
diff -u src/sys/arch/landisk/landisk/machdep.c:1.23 src/sys/arch/landisk/landisk/machdep.c:1.24
--- src/sys/arch/landisk/landisk/machdep.c:1.23	Mon Nov  6 03:47:47 2017
+++ src/sys/arch/landisk/landisk/machdep.c	Tue Mar  5 14:15:32 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.23 2017/11/06 03:47:47 christos Exp $	*/
+/*	$NetBSD: machdep.c,v 1.24 2024/03/05 14:15:32 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.23 2017/11/06 03:47:47 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.24 2024/03/05 14:15:32 thorpej Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -315,11 +315,6 @@ cpu_reboot(int howto, char *bootstr)
 	boothowto = howto;
 	if ((howto & RB_NOSYNC) == 0) {
 		vfs_shutdown();
-		/*
-		 * If we've been adjusting the clock, the todr
-		 * will be out of synch; adjust it now.
-		 */
-		resettodr();
 	}
 
 	/* wait 1s */

Index: src/sys/arch/luna68k/luna68k/machdep.c
diff -u src/sys/arch/luna68k/luna68k/machdep.c:1.111 src/sys/arch/luna68k/luna68k/machdep.c:1.112
--- src/sys/arch/luna68k/luna68k/machdep.c:1.111	Mon Jan 15 19:44:07 2024
+++ src/sys/arch/luna68k/luna68k/machdep.c	Tue Mar  5 14:15:32 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.111 2024/01/15 19:44:07 andvar Exp $ */
+/* $NetBSD: machdep.c,v 1.112 2024/03/05 14:15:32 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.111 2024/01/15 19:44:07 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.112 2024/03/05 14:15:32 thorpej Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -438,11 +438,6 @@ cpu_reboot(int howto, char *bootstr)
 	if ((howto & RB_NOSYNC) == 0 && waittime < 0) {
 		waittime = 0;
 		vfs_shutdown();
-		/*
-		 * If we've been adjusting the clock, the todr
-		 * will be out of synch; adjust it now.
-		 */
-		resettodr();
 	}
 
 	/* Disable interrupts. */

Index: src/sys/arch/macppc/macppc/machdep.c
diff -u src/sys/arch/macppc/macppc/machdep.c:1.175 src/sys/arch/macppc/macppc/machdep.c:1.176
--- src/sys/arch/macppc/macppc/machdep.c:1.175	Sun Jun 26 09:23:32 2022
+++ src/sys/arch/macppc/macppc/machdep.c	Tue Mar  5 14:15:33 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.175 2022/06/26 09:23:32 martin Exp $	*/
+/*	$NetBSD: machdep.c,v 1.176 2024/03/05 14:15:33 thorpej Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.175 2022/06/26 09:23:32 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.176 2024/03/05 14:15:33 thorpej Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_ddb.h"
@@ -228,7 +228,6 @@ cpu_reboot(int howto, char *what)
 	if (!cold && !(howto & RB_NOSYNC) && !syncing) {
 		syncing = 1;
 		vfs_shutdown();		/* sync */
-		resettodr();		/* set wall clock */
 	}
 
 #ifdef MULTIPROCESSOR

Index: src/sys/arch/mipsco/mipsco/machdep.c
diff -u src/sys/arch/mipsco/mipsco/machdep.c:1.81 src/sys/arch/mipsco/mipsco/machdep.c:1.82
--- src/sys/arch/mipsco/mipsco/machdep.c:1.81	Mon Mar  6 21:39:06 2023
+++ src/sys/arch/mipsco/mipsco/machdep.c	Tue Mar  5 14:15:33 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.81 2023/03/06 21:39:06 andvar Exp $	*/
+/*	$NetBSD: machdep.c,v 1.82 2024/03/05 14:15:33 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
 
 #include <sys/cdefs.h>			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.81 2023/03/06 21:39:06 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.82 2024/03/05 14:15:33 thorpej Exp $");
 
 /* from: Utah Hdr: machdep.c 1.63 91/04/24 */
 
@@ -376,12 +376,6 @@ cpu_reboot(volatile int howto, char *boo
 		 */
 		waittime = 0;
 		vfs_shutdown();
-
-		/*
-		 * If we've been adjusting the clock, the todr
-		 * will be out of synch; adjust it now.
-		 */
-		resettodr();
 	}
 
 	/* Disable interrupts. */

Index: src/sys/arch/mvme68k/mvme68k/machdep.c
diff -u src/sys/arch/mvme68k/mvme68k/machdep.c:1.164 src/sys/arch/mvme68k/mvme68k/machdep.c:1.165
--- src/sys/arch/mvme68k/mvme68k/machdep.c:1.164	Thu Jan 18 05:12:30 2024
+++ src/sys/arch/mvme68k/mvme68k/machdep.c	Tue Mar  5 14:15:33 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.164 2024/01/18 05:12:30 thorpej Exp $	*/
+/*	$NetBSD: machdep.c,v 1.165 2024/03/05 14:15:33 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.164 2024/01/18 05:12:30 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.165 2024/03/05 14:15:33 thorpej Exp $");
 
 #include "opt_ddb.h"
 #include "opt_m060sp.h"
@@ -631,11 +631,6 @@ cpu_reboot(int howto, char *bootstr)
 	if ((howto & RB_NOSYNC) == 0 && waittime < 0) {
 		waittime = 0;
 		vfs_shutdown();
-		/*
-		 * If we've been adjusting the clock, the todr
-		 * will be out of synch; adjust it now.
-		 */
-		resettodr();
 	}
 
 	/* Disable interrupts. */

Index: src/sys/arch/mvmeppc/mvmeppc/machdep.c
diff -u src/sys/arch/mvmeppc/mvmeppc/machdep.c:1.35 src/sys/arch/mvmeppc/mvmeppc/machdep.c:1.36
--- src/sys/arch/mvmeppc/mvmeppc/machdep.c:1.35	Fri Jan 19 03:57:04 2024
+++ src/sys/arch/mvmeppc/mvmeppc/machdep.c	Tue Mar  5 14:15:33 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.35 2024/01/19 03:57:04 thorpej Exp $	*/
+/*	$NetBSD: machdep.c,v 1.36 2024/03/05 14:15:33 thorpej Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.35 2024/01/19 03:57:04 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.36 2024/03/05 14:15:33 thorpej Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_mvmeconf.h"
@@ -270,7 +270,6 @@ cpu_reboot(int howto, char *what)
 	if ((howto & RB_NOSYNC) == 0 && syncing == 0) {
 		syncing = 1;
 		vfs_shutdown();		/* sync */
-		resettodr();		/* set wall clock */
 	}
 
 	/* Disable intr */

Index: src/sys/arch/news68k/news68k/machdep.c
diff -u src/sys/arch/news68k/news68k/machdep.c:1.114 src/sys/arch/news68k/news68k/machdep.c:1.115
--- src/sys/arch/news68k/news68k/machdep.c:1.114	Thu Jan 18 04:07:38 2024
+++ src/sys/arch/news68k/news68k/machdep.c	Tue Mar  5 14:15:33 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.114 2024/01/18 04:07:38 thorpej Exp $	*/
+/*	$NetBSD: machdep.c,v 1.115 2024/03/05 14:15:33 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.114 2024/01/18 04:07:38 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.115 2024/03/05 14:15:33 thorpej Exp $");
 
 #include "opt_ddb.h"
 #include "opt_compat_netbsd.h"
@@ -298,11 +298,6 @@ cpu_reboot(int howto, char *bootstr)
 	if ((howto & RB_NOSYNC) == 0 && waittime < 0) {
 		waittime = 0;
 		vfs_shutdown();
-		/*
-		 * If we've been adjusting the clock, the todr
-		 * will be out of synch; adjust it now.
-		 */
-		resettodr();
 	}
 
 	/* Disable interrupts. */

Index: src/sys/arch/newsmips/newsmips/machdep.c
diff -u src/sys/arch/newsmips/newsmips/machdep.c:1.122 src/sys/arch/newsmips/newsmips/machdep.c:1.123
--- src/sys/arch/newsmips/newsmips/machdep.c:1.122	Wed Dec 20 15:29:05 2023
+++ src/sys/arch/newsmips/newsmips/machdep.c	Tue Mar  5 14:15:33 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.122 2023/12/20 15:29:05 thorpej Exp $	*/
+/*	$NetBSD: machdep.c,v 1.123 2024/03/05 14:15:33 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
 
 #include <sys/cdefs.h>			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.122 2023/12/20 15:29:05 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.123 2024/03/05 14:15:33 thorpej Exp $");
 
 /* from: Utah Hdr: machdep.c 1.63 91/04/24 */
 
@@ -474,12 +474,6 @@ cpu_reboot(volatile int howto, char *boo
 		 */
 		waittime = 0;
 		vfs_shutdown();
-
-		/*
-		 * If we've been adjusting the clock, the todr
-		 * will be out of synch; adjust it now.
-		 */
-		resettodr();
 	}
 
 	/* Disable interrupts. */

Index: src/sys/arch/next68k/next68k/machdep.c
diff -u src/sys/arch/next68k/next68k/machdep.c:1.121 src/sys/arch/next68k/next68k/machdep.c:1.122
--- src/sys/arch/next68k/next68k/machdep.c:1.121	Wed Dec 20 00:40:44 2023
+++ src/sys/arch/next68k/next68k/machdep.c	Tue Mar  5 14:15:33 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.121 2023/12/20 00:40:44 thorpej Exp $	*/
+/*	$NetBSD: machdep.c,v 1.122 2024/03/05 14:15:33 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1998 Darrin B. Jewell
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.121 2023/12/20 00:40:44 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.122 2024/03/05 14:15:33 thorpej Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -438,11 +438,6 @@ cpu_reboot(int howto, char *bootstr)
 	if ((howto & RB_NOSYNC) == 0 && waittime < 0) {
 		waittime = 0;
 		vfs_shutdown();
-		/*
-		 * If we've been adjusting the clock, the todr
-		 * will be out of synch; adjust it now.
-		 */
-		resettodr();
 	}
 
 	/* Disable interrupts. */

Index: src/sys/arch/ofppc/include/autoconf.h
diff -u src/sys/arch/ofppc/include/autoconf.h:1.18 src/sys/arch/ofppc/include/autoconf.h:1.19
--- src/sys/arch/ofppc/include/autoconf.h:1.18	Sat Feb 27 02:52:48 2021
+++ src/sys/arch/ofppc/include/autoconf.h	Tue Mar  5 14:15:33 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.h,v 1.18 2021/02/27 02:52:48 thorpej Exp $	*/
+/*	$NetBSD: autoconf.h,v 1.19 2024/03/05 14:15:33 thorpej Exp $	*/
 
 #ifndef _OFPPC_AUTOCONF_H_
 #define _OFPPC_AUTOCONF_H_
@@ -40,8 +40,6 @@ void initppc(u_int, u_int, char *);
 void strayintr(int);
 void dumpsys(void);
 
-void inittodr(time_t);
-void resettodr(void);
 void cpu_initclocks(void);
 void decr_intr(struct clockframe *);
 void setstatclockrate(int);

Index: src/sys/arch/ofppc/ofppc/machdep.c
diff -u src/sys/arch/ofppc/ofppc/machdep.c:1.119 src/sys/arch/ofppc/ofppc/machdep.c:1.120
--- src/sys/arch/ofppc/ofppc/machdep.c:1.119	Fri Mar  5 01:33:33 2021
+++ src/sys/arch/ofppc/ofppc/machdep.c	Tue Mar  5 14:15:34 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.119 2021/03/05 01:33:33 thorpej Exp $	*/
+/*	$NetBSD: machdep.c,v 1.120 2024/03/05 14:15:34 thorpej Exp $	*/
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.119 2021/03/05 01:33:33 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.120 2024/03/05 14:15:34 thorpej Exp $");
 
 #include "opt_ofwoea.h"
 
@@ -326,7 +326,6 @@ cpu_reboot(int howto, char *what)
 	if (!cold && !(howto & RB_NOSYNC) && !syncing) {
 		syncing = 1;
 		vfs_shutdown();         /* sync */
-		resettodr();            /* set wall clock */
 	}
 	splhigh();
 	if (howto & RB_HALT) {

Index: src/sys/arch/playstation2/playstation2/machdep.c
diff -u src/sys/arch/playstation2/playstation2/machdep.c:1.35 src/sys/arch/playstation2/playstation2/machdep.c:1.36
--- src/sys/arch/playstation2/playstation2/machdep.c:1.35	Thu Nov 23 20:40:08 2023
+++ src/sys/arch/playstation2/playstation2/machdep.c	Tue Mar  5 14:15:34 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.35 2023/11/23 20:40:08 andvar Exp $	*/
+/*	$NetBSD: machdep.c,v 1.36 2024/03/05 14:15:34 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.35 2023/11/23 20:40:08 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.36 2024/03/05 14:15:34 thorpej Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kloader.h"
@@ -206,12 +206,6 @@ cpu_reboot(int howto, char *bootstr)
 	if ((howto & RB_NOSYNC) == 0 && (waittime < 0)) {
 		waittime = 0;
 		vfs_shutdown();
-
-		/*
-		 * If we've been adjusting the clock, the todr
-		 * will be out of synch; adjust it now.
-		 */
-		resettodr();
 	}
 
 	splhigh();

Index: src/sys/arch/pmax/pmax/machdep.c
diff -u src/sys/arch/pmax/pmax/machdep.c:1.255 src/sys/arch/pmax/pmax/machdep.c:1.256
--- src/sys/arch/pmax/pmax/machdep.c:1.255	Mon Jan 15 19:44:07 2024
+++ src/sys/arch/pmax/pmax/machdep.c	Tue Mar  5 14:15:34 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.255 2024/01/15 19:44:07 andvar Exp $	*/
+/*	$NetBSD: machdep.c,v 1.256 2024/03/05 14:15:34 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.255 2024/01/15 19:44:07 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.256 2024/03/05 14:15:34 thorpej Exp $");
 
 #include "opt_ddb.h"
 #include "opt_modular.h"
@@ -438,12 +438,6 @@ cpu_reboot(int howto, char *bootstr)
 		 * Synchronize the disks....
 		 */
 		vfs_shutdown();
-
-		/*
-		 * If we've been adjusting the clock, the todr
-		 * will be out of synch; adjust it now.
-		 */
-		resettodr();
 	}
 
 	/* Disable interrupts. */

Index: src/sys/arch/powerpc/booke/booke_machdep.c
diff -u src/sys/arch/powerpc/booke/booke_machdep.c:1.34 src/sys/arch/powerpc/booke/booke_machdep.c:1.35
--- src/sys/arch/powerpc/booke/booke_machdep.c:1.34	Fri Feb  2 22:00:33 2024
+++ src/sys/arch/powerpc/booke/booke_machdep.c	Tue Mar  5 14:15:34 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: booke_machdep.c,v 1.34 2024/02/02 22:00:33 andvar Exp $	*/
+/*	$NetBSD: booke_machdep.c,v 1.35 2024/03/05 14:15:34 thorpej Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -38,7 +38,7 @@
 #define	_POWERPC_BUS_DMA_PRIVATE
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: booke_machdep.c,v 1.34 2024/02/02 22:00:33 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: booke_machdep.c,v 1.35 2024/03/05 14:15:34 thorpej Exp $");
 
 #include "ksyms.h"
 
@@ -266,7 +266,6 @@ cpu_reboot(int howto, char *what)
 	if (!cold && !(howto & RB_NOSYNC) && !syncing) {
 		syncing = 1;
 		vfs_shutdown();		/* sync */
-		resettodr();		/* set wall clock */
 	}
 
 	splhigh();

Index: src/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c
diff -u src/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c:1.38 src/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c:1.39
--- src/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c:1.38	Wed Oct  5 08:18:00 2022
+++ src/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c	Tue Mar  5 14:15:34 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: ibm4xx_machdep.c,v 1.38 2022/10/05 08:18:00 rin Exp $	*/
+/*	$NetBSD: ibm4xx_machdep.c,v 1.39 2024/03/05 14:15:34 thorpej Exp $	*/
 /*	Original: ibm40x_machdep.c,v 1.3 2005/01/17 17:19:36 shige Exp $ */
 
 /*
@@ -68,7 +68,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ibm4xx_machdep.c,v 1.38 2022/10/05 08:18:00 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ibm4xx_machdep.c,v 1.39 2024/03/05 14:15:34 thorpej Exp $");
 
 #include "ksyms.h"
 
@@ -170,7 +170,6 @@ cpu_reboot(int howto, char *what)
 	if (!cold && !(howto & RB_NOSYNC) && !syncing) {
 		syncing = 1;
 		vfs_shutdown();		/* sync */
-		resettodr();		/* set wall clock */
 	}
 
 	splhigh();

Index: src/sys/arch/prep/prep/machdep.c
diff -u src/sys/arch/prep/prep/machdep.c:1.78 src/sys/arch/prep/prep/machdep.c:1.79
--- src/sys/arch/prep/prep/machdep.c:1.78	Wed Dec 20 15:29:06 2023
+++ src/sys/arch/prep/prep/machdep.c	Tue Mar  5 14:15:34 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.78 2023/12/20 15:29:06 thorpej Exp $	*/
+/*	$NetBSD: machdep.c,v 1.79 2024/03/05 14:15:34 thorpej Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.78 2023/12/20 15:29:06 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.79 2024/03/05 14:15:34 thorpej Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_openpic.h"
@@ -249,7 +249,6 @@ cpu_reboot(int howto, char *what)
 	if ((howto & RB_NOSYNC) == 0 && syncing == 0) {
 		syncing = 1;
 		vfs_shutdown();		/* sync */
-		resettodr();		/* set wall clock */
 	}
 
 	/* Disable intr */

Index: src/sys/arch/riscv/riscv/riscv_machdep.c
diff -u src/sys/arch/riscv/riscv/riscv_machdep.c:1.36 src/sys/arch/riscv/riscv/riscv_machdep.c:1.37
--- src/sys/arch/riscv/riscv/riscv_machdep.c:1.36	Thu Jan 18 07:41:50 2024
+++ src/sys/arch/riscv/riscv/riscv_machdep.c	Tue Mar  5 14:15:34 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: riscv_machdep.c,v 1.36 2024/01/18 07:41:50 skrll Exp $	*/
+/*	$NetBSD: riscv_machdep.c,v 1.37 2024/03/05 14:15:34 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2014, 2019, 2022 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 #include "opt_riscv_debug.h"
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: riscv_machdep.c,v 1.36 2024/01/18 07:41:50 skrll Exp $");
+__RCSID("$NetBSD: riscv_machdep.c,v 1.37 2024/03/05 14:15:34 thorpej Exp $");
 
 #include <sys/param.h>
 
@@ -403,8 +403,6 @@ bootsync(void)
 	}
 
 	vfs_shutdown();
-
-	resettodr();
 }
 
 

Index: src/sys/arch/rs6000/include/autoconf.h
diff -u src/sys/arch/rs6000/include/autoconf.h:1.2 src/sys/arch/rs6000/include/autoconf.h:1.3
--- src/sys/arch/rs6000/include/autoconf.h:1.2	Thu Jun 30 00:53:00 2011
+++ src/sys/arch/rs6000/include/autoconf.h	Tue Mar  5 14:15:35 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.h,v 1.2 2011/06/30 00:53:00 matt Exp $	*/
+/*	$NetBSD: autoconf.h,v 1.3 2024/03/05 14:15:35 thorpej Exp $	*/
 
 /*-
  * Copyright (C) 1998	Internet Research Institute, Inc.
@@ -45,7 +45,4 @@ struct confargs {
 
 #ifdef _KERNEL
 paddr_t kvtop(void *);
-
-void inittodr(time_t);
-void resettodr(void);
 #endif /* _KERNEL */

Index: src/sys/arch/sandpoint/sandpoint/machdep.c
diff -u src/sys/arch/sandpoint/sandpoint/machdep.c:1.69 src/sys/arch/sandpoint/sandpoint/machdep.c:1.70
--- src/sys/arch/sandpoint/sandpoint/machdep.c:1.69	Wed Dec 20 15:29:07 2023
+++ src/sys/arch/sandpoint/sandpoint/machdep.c	Tue Mar  5 14:15:35 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.69 2023/12/20 15:29:07 thorpej Exp $	*/
+/*	$NetBSD: machdep.c,v 1.70 2024/03/05 14:15:35 thorpej Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.69 2023/12/20 15:29:07 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.70 2024/03/05 14:15:35 thorpej Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_ddb.h"
@@ -367,7 +367,6 @@ cpu_reboot(int howto, char *what)
 	if ((howto & RB_NOSYNC) == 0 && syncing == 0) {
 		syncing = 1; 
 		vfs_shutdown();		/* sync */
-		resettodr();		/* set wall clock */
 	}	    
 	
 	/* Disable intr */

Index: src/sys/arch/sbmips/sbmips/machdep.c
diff -u src/sys/arch/sbmips/sbmips/machdep.c:1.57 src/sys/arch/sbmips/sbmips/machdep.c:1.58
--- src/sys/arch/sbmips/sbmips/machdep.c:1.57	Wed Dec 20 15:29:07 2023
+++ src/sys/arch/sbmips/sbmips/machdep.c	Tue Mar  5 14:15:35 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.57 2023/12/20 15:29:07 thorpej Exp $ */
+/* $NetBSD: machdep.c,v 1.58 2024/03/05 14:15:35 thorpej Exp $ */
 
 /*
  * Copyright 2000, 2001
@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.57 2023/12/20 15:29:07 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.58 2024/03/05 14:15:35 thorpej Exp $");
 
 #include "opt_ddb.h"
 #include "opt_execfmt.h"
@@ -356,12 +356,6 @@ cpu_reboot(int howto, char *bootstr)
 	if ((howto & RB_NOSYNC) == 0 && (waittime < 0)) {
 		waittime = 0;
 		vfs_shutdown();
-
-		/*
-		 * If we've been adjusting the clock, the todr
-		 * will be out of synch; adjust it now.
-		 */
-		resettodr();
 	}
 
 	splhigh();

Index: src/sys/arch/sgimips/sgimips/machdep.c
diff -u src/sys/arch/sgimips/sgimips/machdep.c:1.153 src/sys/arch/sgimips/sgimips/machdep.c:1.154
--- src/sys/arch/sgimips/sgimips/machdep.c:1.153	Wed Dec 20 15:29:08 2023
+++ src/sys/arch/sgimips/sgimips/machdep.c	Tue Mar  5 14:15:35 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.153 2023/12/20 15:29:08 thorpej Exp $	*/
+/*	$NetBSD: machdep.c,v 1.154 2024/03/05 14:15:35 thorpej Exp $	*/
 
 /*
  * Copyright (c) 2000 Soren S. Jorvang
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.153 2023/12/20 15:29:08 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.154 2024/03/05 14:15:35 thorpej Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -754,12 +754,6 @@ cpu_reboot(int howto, char *bootstr)
 	if ((howto & RB_NOSYNC) == 0 && (waittime < 0)) {
 		waittime = 0;
 		vfs_shutdown();
-
-		/*
-		 * If we've been adjusting the clock, the todr
-		 * will be out of synch; adjust it now.
-		 */
-		resettodr();
 	}
 
 	/* Clear and disable watchdog timer. */

Index: src/sys/arch/sparc/sparc/machdep.c
diff -u src/sys/arch/sparc/sparc/machdep.c:1.340 src/sys/arch/sparc/sparc/machdep.c:1.341
--- src/sys/arch/sparc/sparc/machdep.c:1.340	Fri Dec  1 05:22:01 2023
+++ src/sys/arch/sparc/sparc/machdep.c	Tue Mar  5 14:15:35 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.340 2023/12/01 05:22:01 thorpej Exp $ */
+/*	$NetBSD: machdep.c,v 1.341 2024/03/05 14:15:35 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.340 2023/12/01 05:22:01 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.341 2024/03/05 14:15:35 thorpej Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_compat_sunos.h"
@@ -830,14 +830,6 @@ cpu_reboot(int howto, char *user_boot_st
 			curlwp = &lwp0;
 		waittime = 0;
 		vfs_shutdown();
-
-		/*
-		 * If we've been adjusting the clock, the todr
-		 * will be out of synch; adjust it now.
-		 * resettodr will only do this only if inittodr()
-		 * has already been called.
-		 */
-		resettodr();
 	}
 
 	/* Disable interrupts. But still allow IPI on MP systems */

Index: src/sys/arch/sparc64/sparc64/machdep.c
diff -u src/sys/arch/sparc64/sparc64/machdep.c:1.307 src/sys/arch/sparc64/sparc64/machdep.c:1.308
--- src/sys/arch/sparc64/sparc64/machdep.c:1.307	Wed Oct  4 20:28:05 2023
+++ src/sys/arch/sparc64/sparc64/machdep.c	Tue Mar  5 14:15:35 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.307 2023/10/04 20:28:05 ad Exp $ */
+/*	$NetBSD: machdep.c,v 1.308 2024/03/05 14:15:35 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2019, 2023 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.307 2023/10/04 20:28:05 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.308 2024/03/05 14:15:35 thorpej Exp $");
 
 #include "opt_ddb.h"
 #include "opt_multiprocessor.h"
@@ -558,17 +558,6 @@ cpu_reboot(int howto, char *user_boot_st
 			syncdone = true;
 			/* XXX used to force unmount as well, here */
 			vfs_sync_all(l);
-			/*
-			 * If we've been adjusting the clock, the todr
-			 * will be out of synch; adjust it now.
-			 *
-			 * resettodr will only do this only if inittodr()
-			 * has already been called.
-			 *
-			 * XXX used to do this after unmounting all
-			 * filesystems with vfs_shutdown().
-			 */
-			resettodr();
 		}
 
 		while (vfs_unmountall1(l, false, false) ||

Index: src/sys/arch/vax/vax/machdep.c
diff -u src/sys/arch/vax/vax/machdep.c:1.198 src/sys/arch/vax/vax/machdep.c:1.199
--- src/sys/arch/vax/vax/machdep.c:1.198	Thu Jan 11 04:33:45 2024
+++ src/sys/arch/vax/vax/machdep.c	Tue Mar  5 14:15:36 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.198 2024/01/11 04:33:45 mrg Exp $	 */
+/* $NetBSD: machdep.c,v 1.199 2024/03/05 14:15:36 thorpej Exp $	 */
 
 /*
  * Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
@@ -83,7 +83,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.198 2024/01/11 04:33:45 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.199 2024/03/05 14:15:36 thorpej Exp $");
 
 #include "opt_ddb.h"
 #include "opt_compat_netbsd.h"
@@ -340,11 +340,6 @@ cpu_reboot(int howto, char *b)
 	if ((howto & RB_NOSYNC) == 0 && waittime < 0) {
 		waittime = 0;
 		vfs_shutdown();
-		/*
-		 * If we've been adjusting the clock, the todr will be out of
-		 * synch; adjust it now.
-		 */
-		resettodr();
 	}
 	splhigh();		/* extreme priority */
 	if (howto & RB_HALT) {

Index: src/sys/arch/virt68k/virt68k/machdep.c
diff -u src/sys/arch/virt68k/virt68k/machdep.c:1.8 src/sys/arch/virt68k/virt68k/machdep.c:1.9
--- src/sys/arch/virt68k/virt68k/machdep.c:1.8	Sat Jan 13 17:10:58 2024
+++ src/sys/arch/virt68k/virt68k/machdep.c	Tue Mar  5 14:15:36 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.8 2024/01/13 17:10:58 thorpej Exp $	*/
+/*	$NetBSD: machdep.c,v 1.9 2024/03/05 14:15:36 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.8 2024/01/13 17:10:58 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.9 2024/03/05 14:15:36 thorpej Exp $");
 
 #include "opt_ddb.h"
 #include "opt_m060sp.h"
@@ -462,11 +462,6 @@ cpu_reboot(int howto, char *bootstr)
 	if ((howto & RB_NOSYNC) == 0 && waittime < 0) {
 		waittime = 0;
 		vfs_shutdown();
-		/*
-		 * If we've been adjusting the clock, the todr
-		 * will be out of synch; adjust it now.
-		 */
-		resettodr();
 	}
 
 	/* Disable interrupts. */

Index: src/sys/arch/zaurus/zaurus/machdep.c
diff -u src/sys/arch/zaurus/zaurus/machdep.c:1.53 src/sys/arch/zaurus/zaurus/machdep.c:1.54
--- src/sys/arch/zaurus/zaurus/machdep.c:1.53	Sat Dec 23 18:59:27 2023
+++ src/sys/arch/zaurus/zaurus/machdep.c	Tue Mar  5 14:15:36 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.53 2023/12/23 18:59:27 andvar Exp $	*/
+/*	$NetBSD: machdep.c,v 1.54 2024/03/05 14:15:36 thorpej Exp $	*/
 /*	$OpenBSD: zaurus_machdep.c,v 1.25 2006/06/20 18:24:04 todd Exp $	*/
 
 /*
@@ -107,7 +107,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.53 2023/12/23 18:59:27 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.54 2024/03/05 14:15:36 thorpej Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -371,11 +371,6 @@ cpu_reboot(int howto, char *bootstr)
 	 */
 	if (!(howto & RB_NOSYNC)) {
 		bootsync();
-		/*
-		 * If we've been adjusting the clock, the todr
-		 * will be out of synch; adjust it now.
-		 */
-		resettodr();
 	}
 
 	/* Wait 3s */

Index: src/sys/kern/kern_reboot.c
diff -u src/sys/kern/kern_reboot.c:1.4 src/sys/kern/kern_reboot.c:1.5
--- src/sys/kern/kern_reboot.c:1.4	Sun Feb 23 22:56:41 2020
+++ src/sys/kern/kern_reboot.c	Tue Mar  5 14:15:36 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_reboot.c,v 1.4 2020/02/23 22:56:41 ad Exp $	*/
+/*	$NetBSD: kern_reboot.c,v 1.5 2024/03/05 14:15:36 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_reboot.c,v 1.4 2020/02/23 22:56:41 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_reboot.c,v 1.5 2024/03/05 14:15:36 thorpej Exp $");
 
 #include <sys/atomic.h>
 #include <sys/param.h>
@@ -44,6 +44,7 @@ __KERNEL_RCSID(0, "$NetBSD: kern_reboot.
 #include <sys/syscallargs.h>
 #include <sys/kernel.h>
 #include <sys/kauth.h>
+#include <sys/timevar.h>
 
 /*
  * Reboot / shutdown the system.
@@ -65,11 +66,28 @@ kern_reboot(int howto, char *bootstr)
 	}
 	shutting_down = 1;
 
+	/* Just cut to the chase if cold. */
+	if (cold) {
+		goto do_cpu_reboot;
+	}
+
+	if ((boothowto & RB_NOSYNC) == 0 && panicstr == NULL) {
+		/*
+		 * If we've been adjusting the clock, the todr
+		 * will be out of synch; adjust it now.
+		 */
+		if (time_adjusted != 0) {
+			time_adjusted = 0;
+			resettodr();
+		}
+	}
+
 	/*
 	 * XXX We should re-factor out all of the common stuff
 	 * that each and every cpu_reboot() does and put it here.
 	 */
 
+ do_cpu_reboot:
 	cpu_reboot(howto, bootstr);
 }
 

Reply via email to