diff options
author | cheloha <cheloha@cvs.openbsd.org> | 2021-01-13 16:28:51 +0000 |
---|---|---|
committer | cheloha <cheloha@cvs.openbsd.org> | 2021-01-13 16:28:51 +0000 |
commit | 0f6bd286a19ba063d7a833c67f1faf51610888cb (patch) | |
tree | e28dbceb99c0ee1105d79bd5f10d453470d05e97 /sys | |
parent | e7c115f6e0bc1d5c4980e0ed417c24b978e3e2fa (diff) |
kernel, sysctl(8): remove dead variable: tickadj
The global "tickadj" variable is a remnant of the old NTP adjustment
code we used in the kernel before the current timecounter subsystem
was imported from FreeBSD circa 2004 or 2005.
Fifteen years hence it is completely vestigial and we can remove it.
We probably should have removed it long ago but I guess it slipped
through the cracks. FreeBSD removed it in 2002:
https://cgit.freebsd.org/src/commit/?id=e1d970f1811e5e1e9c912c032acdcec6521b2a6d
NetBSD and DragonflyBSD can probably remove it, too.
We export tickadj via the kern.clockrate sysctl(2), so update sysctl.2
and sysctl(8) accordingly. Hypothetically this change could break
someone's sysctl(8) parsing script. I don't think that's very likely.
ok mvs@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/mips64/mips64/mips64_machdep.c | 5 | ||||
-rw-r--r-- | sys/conf/param.c | 3 | ||||
-rw-r--r-- | sys/kern/kern_clock.c | 7 | ||||
-rw-r--r-- | sys/sys/kernel.h | 3 | ||||
-rw-r--r-- | sys/sys/time.h | 3 |
5 files changed, 6 insertions, 15 deletions
diff --git a/sys/arch/mips64/mips64/mips64_machdep.c b/sys/arch/mips64/mips64/mips64_machdep.c index 5b348d9edd7..a8479191d89 100644 --- a/sys/arch/mips64/mips64/mips64_machdep.c +++ b/sys/arch/mips64/mips64/mips64_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mips64_machdep.c,v 1.33 2020/07/11 15:18:08 visa Exp $ */ +/* $OpenBSD: mips64_machdep.c,v 1.34 2021/01/13 16:28:49 cheloha Exp $ */ /* * Copyright (c) 2009, 2010, 2012 Miodrag Vallat. @@ -323,14 +323,13 @@ cp0_calibrate(struct cpu_info *ci) * Start the real-time and statistics clocks. */ void -cpu_initclocks() +cpu_initclocks(void) { struct cpu_info *ci = curcpu(); profhz = hz; tick = 1000000 / hz; /* number of micro-seconds between interrupts */ - tickadj = 240000 / (60 * hz); /* can adjust 240ms in 60s */ cp0_calibrate(ci); diff --git a/sys/conf/param.c b/sys/conf/param.c index 47d14805ebc..f5ea79cfd21 100644 --- a/sys/conf/param.c +++ b/sys/conf/param.c @@ -1,4 +1,4 @@ -/* $OpenBSD: param.c,v 1.45 2019/09/07 01:23:23 cheloha Exp $ */ +/* $OpenBSD: param.c,v 1.46 2021/01/13 16:28:50 cheloha Exp $ */ /* $NetBSD: param.c,v 1.16 1996/03/12 03:08:40 mrg Exp $ */ /* @@ -75,7 +75,6 @@ int hz = HZ; int tick = 1000000 / HZ; int tick_nsec = 1000000000 / HZ; -int tickadj = 240000 / (60 * HZ); /* can adjust 240ms in 60s */ int utc_offset = 0; #define NPROCESS (30 + 16 * MAXUSERS) #define NTEXT (80 + NPROCESS / 8) /* actually the object cache */ diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c index b6e0ca4f65a..0230bd8fc6b 100644 --- a/sys/kern/kern_clock.c +++ b/sys/kern/kern_clock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_clock.c,v 1.101 2020/01/21 16:16:23 mpi Exp $ */ +/* $OpenBSD: kern_clock.c,v 1.102 2021/01/13 16:28:49 cheloha Exp $ */ /* $NetBSD: kern_clock.c,v 1.34 1996/06/09 04:51:03 briggs Exp $ */ /*- @@ -120,10 +120,6 @@ initclocks(void) profhz = i; psratio = profhz / i; - /* For very large HZ, ensure that division by 0 does not occur later */ - if (tickadj == 0) - tickadj = 1; - inittimecounter(); } @@ -421,7 +417,6 @@ sysctl_clockrate(char *where, size_t *sizep, void *newp) */ memset(&clkinfo, 0, sizeof clkinfo); clkinfo.tick = tick; - clkinfo.tickadj = tickadj; clkinfo.hz = hz; clkinfo.profhz = profhz; clkinfo.stathz = stathz ? stathz : hz; diff --git a/sys/sys/kernel.h b/sys/sys/kernel.h index f86701ab327..b0a66fdd47c 100644 --- a/sys/sys/kernel.h +++ b/sys/sys/kernel.h @@ -1,4 +1,4 @@ -/* $OpenBSD: kernel.h,v 1.24 2020/10/15 15:36:31 cheloha Exp $ */ +/* $OpenBSD: kernel.h,v 1.25 2021/01/13 16:28:50 cheloha Exp $ */ /* $NetBSD: kernel.h,v 1.11 1995/03/03 01:24:16 cgd Exp $ */ /*- @@ -51,7 +51,6 @@ extern int utc_offset; /* seconds east of UTC */ extern int tick; /* usec per tick (1000000 / hz) */ extern int tick_nsec; /* nsec per tick */ -extern int tickadj; /* "standard" clock skew, us./tick */ extern int ticks; /* # of hardclock ticks */ extern int hz; /* system clock's frequency */ extern int stathz; /* statistics clock's frequency */ diff --git a/sys/sys/time.h b/sys/sys/time.h index 8c1bf04afa1..e5cd4eba727 100644 --- a/sys/sys/time.h +++ b/sys/sys/time.h @@ -1,4 +1,4 @@ -/* $OpenBSD: time.h,v 1.57 2020/10/15 16:31:11 cheloha Exp $ */ +/* $OpenBSD: time.h,v 1.58 2021/01/13 16:28:50 cheloha Exp $ */ /* $NetBSD: time.h,v 1.18 1996/04/23 10:29:33 mycroft Exp $ */ /* @@ -157,7 +157,6 @@ struct itimerval { struct clockinfo { int hz; /* clock frequency */ int tick; /* micro-seconds per hz tick */ - int tickadj; /* clock skew rate for adjtime() */ int stathz; /* statistics clock frequency */ int profhz; /* profiling clock frequency */ }; |