From: cheloha Date: Sat, 4 Feb 2023 19:19:35 +0000 (+0000) Subject: timecounting: remove incomplete PPS support X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=24ee467d1e5e812429867003c29e5339cd18bad7;p=openbsd timecounting: remove incomplete PPS support The timecounting code has had stubs for pulse-per-second (PPS) polling since it was imported in 2004. At this point it seems unlikely that anyone is going to finish adding PPS support, so let's remove the stubs: - Delete the dead tc_poll_pps() call from tc_windup(). - Remove all tc_poll_pps symbols from the kernel. Link: https://marc.info/?l=openbsd-tech&m=167519035723210&w=2 ok miod@ --- diff --git a/share/man/man9/tc_init.9 b/share/man/man9/tc_init.9 index 22140930346..b04275cdc33 100644 --- a/share/man/man9/tc_init.9 +++ b/share/man/man9/tc_init.9 @@ -1,4 +1,4 @@ -.\" $OpenBSD: tc_init.9,v 1.10 2023/01/17 10:10:11 jsg Exp $ +.\" $OpenBSD: tc_init.9,v 1.11 2023/02/04 19:19:36 cheloha Exp $ .\" .\" Copyright (c) 2004 Alexander Yurchenko .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: January 17 2023 $ +.Dd $Mdocdate: February 4 2023 $ .Dt TC_INIT 9 .Os .Sh NAME @@ -46,7 +46,6 @@ structure: .Bd -literal -offset indent struct timecounter { timecounter_get_t *tc_get_timecount; - timecounter_pps_t *tc_poll_pps; u_int tc_counter_mask; u_int64_t tc_frequency; char *tc_name; @@ -64,12 +63,6 @@ structure are described below. This function reads the counter. It is not required to mask any unimplemented bits out, as long as they are constant. -.It Ft void Fn (*tc_poll_pps) "struct timecounter *" -This function is optional and can be set to NULL. -It will be called whenever the timecounter is rewound, and is intended -to check for PPS events. -Normal hardware does not need it but timecounters which latch PPS in -hardware do. .It Va tc_counter_mask This mask should mask off any unimplemented bits. .It Va tc_frequency diff --git a/sys/arch/alpha/alpha/clock.c b/sys/arch/alpha/alpha/clock.c index 7c16799bc12..6943160dc89 100644 --- a/sys/arch/alpha/alpha/clock.c +++ b/sys/arch/alpha/alpha/clock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clock.c,v 1.26 2022/12/10 15:02:29 cheloha Exp $ */ +/* $OpenBSD: clock.c,v 1.27 2023/02/04 19:19:36 cheloha Exp $ */ /* $NetBSD: clock.c,v 1.29 2000/06/05 21:47:10 thorpej Exp $ */ /* @@ -65,7 +65,6 @@ int clk_irq = 0; u_int rpcc_get_timecount(struct timecounter *); struct timecounter rpcc_timecounter = { .tc_get_timecount = rpcc_get_timecount, - .tc_poll_pps = NULL, .tc_counter_mask = ~0u, .tc_frequency = 0, .tc_name = "rpcc", diff --git a/sys/arch/amd64/amd64/tsc.c b/sys/arch/amd64/amd64/tsc.c index a3086a47def..c642dc1bca3 100644 --- a/sys/arch/amd64/amd64/tsc.c +++ b/sys/arch/amd64/amd64/tsc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tsc.c,v 1.30 2022/10/24 00:56:33 cheloha Exp $ */ +/* $OpenBSD: tsc.c,v 1.31 2023/02/04 19:19:36 cheloha Exp $ */ /* * Copyright (c) 2008 The NetBSD Foundation, Inc. * Copyright (c) 2016,2017 Reyk Floeter @@ -49,7 +49,6 @@ u_int64_t (*tsc_rdtsc)(void) = rdtsc_lfence; struct timecounter tsc_timecounter = { .tc_get_timecount = tsc_get_timecount_lfence, - .tc_poll_pps = NULL, .tc_counter_mask = ~0u, .tc_frequency = 0, .tc_name = "tsc", diff --git a/sys/arch/amd64/isa/clock.c b/sys/arch/amd64/isa/clock.c index f36ecde0087..44b221a11e2 100644 --- a/sys/arch/amd64/isa/clock.c +++ b/sys/arch/amd64/isa/clock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clock.c,v 1.38 2022/11/08 17:34:13 cheloha Exp $ */ +/* $OpenBSD: clock.c,v 1.39 2023/02/04 19:19:36 cheloha Exp $ */ /* $NetBSD: clock.c,v 1.1 2003/04/26 18:39:50 fvdl Exp $ */ /*- @@ -118,7 +118,6 @@ u_int i8254_simple_get_timecount(struct timecounter *tc); static struct timecounter i8254_timecounter = { .tc_get_timecount = i8254_get_timecount, - .tc_poll_pps = NULL, .tc_counter_mask = ~0u, .tc_frequency = TIMER_FREQ, .tc_name = "i8254", diff --git a/sys/arch/arm/cortex/agtimer.c b/sys/arch/arm/cortex/agtimer.c index 77ecfbb2e92..9ccf56fc3bf 100644 --- a/sys/arch/arm/cortex/agtimer.c +++ b/sys/arch/arm/cortex/agtimer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: agtimer.c,v 1.16 2023/01/17 02:58:22 cheloha Exp $ */ +/* $OpenBSD: agtimer.c,v 1.17 2023/02/04 19:19:36 cheloha Exp $ */ /* * Copyright (c) 2011 Dale Rahn * Copyright (c) 2013 Patrick Wildt @@ -45,7 +45,6 @@ u_int agtimer_get_timecount(struct timecounter *); static struct timecounter agtimer_timecounter = { .tc_get_timecount = agtimer_get_timecount, - .tc_poll_pps = NULL, .tc_counter_mask = 0xffffffff, .tc_frequency = 0, .tc_name = "agtimer", diff --git a/sys/arch/arm/cortex/amptimer.c b/sys/arch/arm/cortex/amptimer.c index b4a46c4a88d..455d75e2aeb 100644 --- a/sys/arch/arm/cortex/amptimer.c +++ b/sys/arch/arm/cortex/amptimer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: amptimer.c,v 1.15 2023/01/17 02:47:55 cheloha Exp $ */ +/* $OpenBSD: amptimer.c,v 1.16 2023/02/04 19:19:36 cheloha Exp $ */ /* * Copyright (c) 2011 Dale Rahn * @@ -67,7 +67,6 @@ u_int amptimer_get_timecount(struct timecounter *); static struct timecounter amptimer_timecounter = { .tc_get_timecount = amptimer_get_timecount, - .tc_poll_pps = NULL, .tc_counter_mask = 0xffffffff, .tc_frequency = 0, .tc_name = "amptimer", diff --git a/sys/arch/arm64/dev/agtimer.c b/sys/arch/arm64/dev/agtimer.c index f5da40babef..d7909051dfe 100644 --- a/sys/arch/arm64/dev/agtimer.c +++ b/sys/arch/arm64/dev/agtimer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: agtimer.c,v 1.21 2023/01/09 15:22:53 kettenis Exp $ */ +/* $OpenBSD: agtimer.c,v 1.22 2023/02/04 19:19:36 cheloha Exp $ */ /* * Copyright (c) 2011 Dale Rahn * Copyright (c) 2013 Patrick Wildt @@ -47,7 +47,6 @@ u_int agtimer_get_timecount_sun50i(struct timecounter *); static struct timecounter agtimer_timecounter = { .tc_get_timecount = agtimer_get_timecount_default, - .tc_poll_pps = NULL, .tc_counter_mask = 0xffffffff, .tc_frequency = 0, .tc_name = "agtimer", diff --git a/sys/arch/armv7/omap/dmtimer.c b/sys/arch/armv7/omap/dmtimer.c index 7e0436b0ada..753e49badc3 100644 --- a/sys/arch/armv7/omap/dmtimer.c +++ b/sys/arch/armv7/omap/dmtimer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dmtimer.c,v 1.17 2023/01/27 22:16:52 cheloha Exp $ */ +/* $OpenBSD: dmtimer.c,v 1.18 2023/02/04 19:19:36 cheloha Exp $ */ /* * Copyright (c) 2007,2009 Dale Rahn * Copyright (c) 2013 Raphael Graf @@ -109,7 +109,6 @@ u_int dmtimer_get_timecount(struct timecounter *); static struct timecounter dmtimer_timecounter = { .tc_get_timecount = dmtimer_get_timecount, - .tc_poll_pps = NULL, .tc_counter_mask = 0xffffffff, .tc_frequency = 0, .tc_name = "dmtimer", diff --git a/sys/arch/armv7/omap/gptimer.c b/sys/arch/armv7/omap/gptimer.c index f4624594e9b..28ad42bb8a3 100644 --- a/sys/arch/armv7/omap/gptimer.c +++ b/sys/arch/armv7/omap/gptimer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gptimer.c,v 1.18 2023/01/25 14:14:39 cheloha Exp $ */ +/* $OpenBSD: gptimer.c,v 1.19 2023/02/04 19:19:36 cheloha Exp $ */ /* * Copyright (c) 2007,2009 Dale Rahn * @@ -111,7 +111,6 @@ u_int gptimer_get_timecount(struct timecounter *); static struct timecounter gptimer_timecounter = { .tc_get_timecount = gptimer_get_timecount, - .tc_poll_pps = NULL, .tc_counter_mask = 0xffffffff, .tc_frequency = 0, .tc_name = "gptimer", diff --git a/sys/arch/armv7/sunxi/sxitimer.c b/sys/arch/armv7/sunxi/sxitimer.c index 177fe530d41..d547e014b4a 100644 --- a/sys/arch/armv7/sunxi/sxitimer.c +++ b/sys/arch/armv7/sunxi/sxitimer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sxitimer.c,v 1.19 2023/01/17 02:38:59 cheloha Exp $ */ +/* $OpenBSD: sxitimer.c,v 1.20 2023/02/04 19:19:36 cheloha Exp $ */ /* * Copyright (c) 2007,2009 Dale Rahn * Copyright (c) 2013 Raphael Graf @@ -87,7 +87,6 @@ u_int sxitimer_get_timecount(struct timecounter *); static struct timecounter sxitimer_timecounter = { .tc_get_timecount = sxitimer_get_timecount, - .tc_poll_pps = NULL, .tc_counter_mask = 0xffffffff, .tc_frequency = 0, .tc_name = "sxitimer", diff --git a/sys/arch/hppa/dev/clock.c b/sys/arch/hppa/dev/clock.c index 79d08d989c8..f0ebd389204 100644 --- a/sys/arch/hppa/dev/clock.c +++ b/sys/arch/hppa/dev/clock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clock.c,v 1.34 2023/01/20 17:18:08 cheloha Exp $ */ +/* $OpenBSD: clock.c,v 1.35 2023/02/04 19:19:36 cheloha Exp $ */ /* * Copyright (c) 1998-2003 Michael Shalayeff @@ -55,7 +55,6 @@ void itmr_trigger_wrapper(void *); struct timecounter itmr_timecounter = { .tc_get_timecount = itmr_get_timecount, - .tc_poll_pps = NULL, .tc_counter_mask = 0xffffffff, .tc_frequency = 0, .tc_name = "itmr", diff --git a/sys/arch/i386/isa/clock.c b/sys/arch/i386/isa/clock.c index 0f0b70e3f9a..4c3f402272d 100644 --- a/sys/arch/i386/isa/clock.c +++ b/sys/arch/i386/isa/clock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clock.c,v 1.63 2023/01/30 10:49:05 jsg Exp $ */ +/* $OpenBSD: clock.c,v 1.64 2023/02/04 19:19:36 cheloha Exp $ */ /* $NetBSD: clock.c,v 1.39 1996/05/12 23:11:54 mycroft Exp $ */ /*- @@ -129,7 +129,6 @@ u_int i8254_simple_get_timecount(struct timecounter *tc); static struct timecounter i8254_timecounter = { .tc_get_timecount = i8254_get_timecount, - .tc_poll_pps = NULL, .tc_counter_mask = ~0u, .tc_frequency = TIMER_FREQ, .tc_name = "i8254", diff --git a/sys/arch/i386/pci/geodesc.c b/sys/arch/i386/pci/geodesc.c index 9be655d22ca..4548cc1e3d2 100644 --- a/sys/arch/i386/pci/geodesc.c +++ b/sys/arch/i386/pci/geodesc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: geodesc.c,v 1.17 2022/02/21 10:24:28 mpi Exp $ */ +/* $OpenBSD: geodesc.c,v 1.18 2023/02/04 19:19:36 cheloha Exp $ */ /* * Copyright (c) 2003 Markus Friedl @@ -61,7 +61,6 @@ u_int geodesc_get_timecount(struct timecounter *tc); struct timecounter geodesc_timecounter = { .tc_get_timecount = geodesc_get_timecount, - .tc_poll_pps = 0, .tc_counter_mask = 0xffffffff, .tc_frequency = 27000000, .tc_name = "GEOTSC", diff --git a/sys/arch/i386/pci/gscpm.c b/sys/arch/i386/pci/gscpm.c index c91aa0f4c3e..9120dc96bfb 100644 --- a/sys/arch/i386/pci/gscpm.c +++ b/sys/arch/i386/pci/gscpm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gscpm.c,v 1.13 2022/02/21 10:24:28 mpi Exp $ */ +/* $OpenBSD: gscpm.c,v 1.14 2023/02/04 19:19:36 cheloha Exp $ */ /* * Copyright (c) 2004 Alexander Yurchenko * @@ -51,7 +51,6 @@ u_int gscpm_get_timecount(struct timecounter *tc); struct timecounter gscpm_timecounter = { .tc_get_timecount = gscpm_get_timecount, - .tc_poll_pps = 0, .tc_counter_mask = 0xffffff, .tc_frequency = 3579545, .tc_name = "GSCPM", diff --git a/sys/arch/i386/pci/ichpcib.c b/sys/arch/i386/pci/ichpcib.c index 6c9c1e85844..1524d56d1cc 100644 --- a/sys/arch/i386/pci/ichpcib.c +++ b/sys/arch/i386/pci/ichpcib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ichpcib.c,v 1.32 2023/01/30 10:49:05 jsg Exp $ */ +/* $OpenBSD: ichpcib.c,v 1.33 2023/02/04 19:19:36 cheloha Exp $ */ /* * Copyright (c) 2004 Alexander Yurchenko * @@ -56,7 +56,6 @@ u_int ichpcib_get_timecount(struct timecounter *tc); struct timecounter ichpcib_timecounter = { .tc_get_timecount = ichpcib_get_timecount, - .tc_poll_pps = 0, .tc_counter_mask = 0xffffff, .tc_frequency = 3579545, .tc_name = "ICHPM", diff --git a/sys/arch/loongson/loongson/generic3a_machdep.c b/sys/arch/loongson/loongson/generic3a_machdep.c index 28d09905bc3..59e7583e390 100644 --- a/sys/arch/loongson/loongson/generic3a_machdep.c +++ b/sys/arch/loongson/loongson/generic3a_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: generic3a_machdep.c,v 1.11 2021/07/24 08:21:13 visa Exp $ */ +/* $OpenBSD: generic3a_machdep.c,v 1.12 2023/02/04 19:19:36 cheloha Exp $ */ /* * Copyright (c) 2009, 2010, 2012 Miodrag Vallat. @@ -94,7 +94,6 @@ u_int rs780e_get_timecount(struct timecounter *); struct timecounter rs780e_timecounter = { .tc_get_timecount = rs780e_get_timecount, - .tc_poll_pps = NULL, .tc_counter_mask = 0xffffffffu, /* truncated to 32 bits */ .tc_frequency = HPET_FREQ, .tc_name = "hpet", diff --git a/sys/arch/macppc/macppc/clock.c b/sys/arch/macppc/macppc/clock.c index d8c30f13609..18b2522a3d1 100644 --- a/sys/arch/macppc/macppc/clock.c +++ b/sys/arch/macppc/macppc/clock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clock.c,v 1.52 2023/01/27 22:13:48 cheloha Exp $ */ +/* $OpenBSD: clock.c,v 1.53 2023/02/04 19:19:36 cheloha Exp $ */ /* $NetBSD: clock.c,v 1.1 1996/09/30 16:34:40 ws Exp $ */ /* @@ -69,7 +69,6 @@ const struct intrclock dec_intrclock = { static struct timecounter tb_timecounter = { .tc_get_timecount = tb_get_timecount, - .tc_poll_pps = NULL, .tc_counter_mask = 0xffffffff, .tc_frequency = 0, .tc_name = "tb", diff --git a/sys/arch/mips64/mips64/mips64_machdep.c b/sys/arch/mips64/mips64/mips64_machdep.c index 634aaae7d57..27d1e442158 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.40 2022/11/19 16:23:48 cheloha Exp $ */ +/* $OpenBSD: mips64_machdep.c,v 1.41 2023/02/04 19:19:36 cheloha Exp $ */ /* * Copyright (c) 2009, 2010, 2012 Miodrag Vallat. @@ -251,7 +251,6 @@ u_int cp0_get_timecount(struct timecounter *); struct timecounter cp0_timecounter = { .tc_get_timecount = cp0_get_timecount, - .tc_poll_pps = 0, .tc_counter_mask = 0xffffffff, .tc_frequency = 0, .tc_name = "CP0", diff --git a/sys/arch/octeon/octeon/machdep.c b/sys/arch/octeon/octeon/machdep.c index a490eff6771..0adc6f84e47 100644 --- a/sys/arch/octeon/octeon/machdep.c +++ b/sys/arch/octeon/octeon/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.135 2023/01/11 03:20:52 visa Exp $ */ +/* $OpenBSD: machdep.c,v 1.136 2023/02/04 19:19:36 cheloha Exp $ */ /* * Copyright (c) 2009, 2010 Miodrag Vallat. @@ -149,7 +149,6 @@ u_int ioclock_get_timecount(struct timecounter *); struct timecounter ioclock_timecounter = { .tc_get_timecount = ioclock_get_timecount, - .tc_poll_pps = NULL, .tc_counter_mask = 0xffffffff, /* truncated to 32 bits */ .tc_frequency = 0, /* determined at runtime */ .tc_name = "ioclock", diff --git a/sys/arch/powerpc64/powerpc64/clock.c b/sys/arch/powerpc64/powerpc64/clock.c index beff9e1982a..dee92d75eb2 100644 --- a/sys/arch/powerpc64/powerpc64/clock.c +++ b/sys/arch/powerpc64/powerpc64/clock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clock.c,v 1.8 2023/01/27 22:14:43 cheloha Exp $ */ +/* $OpenBSD: clock.c,v 1.9 2023/02/04 19:19:36 cheloha Exp $ */ /* * Copyright (c) 2020 Mark Kettenis @@ -45,7 +45,6 @@ u_int tb_get_timecount(struct timecounter *); static struct timecounter tb_timecounter = { .tc_get_timecount = tb_get_timecount, - .tc_poll_pps = NULL, .tc_counter_mask = 0xffffffff, .tc_frequency = 0, .tc_name = "tb", diff --git a/sys/arch/riscv64/riscv64/clock.c b/sys/arch/riscv64/riscv64/clock.c index 44459d35758..9c66f41fa8f 100644 --- a/sys/arch/riscv64/riscv64/clock.c +++ b/sys/arch/riscv64/riscv64/clock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clock.c,v 1.8 2023/01/27 15:37:16 cheloha Exp $ */ +/* $OpenBSD: clock.c,v 1.9 2023/02/04 19:19:37 cheloha Exp $ */ /* * Copyright (c) 2020 Mark Kettenis @@ -48,7 +48,6 @@ u_int tb_get_timecount(struct timecounter *); static struct timecounter tb_timecounter = { .tc_get_timecount = tb_get_timecount, - .tc_poll_pps = NULL, .tc_counter_mask = 0xffffffff, .tc_frequency = 0, .tc_name = "tb", diff --git a/sys/arch/sparc64/dev/psycho.c b/sys/arch/sparc64/dev/psycho.c index 139aa489d9e..033f5170c62 100644 --- a/sys/arch/sparc64/dev/psycho.c +++ b/sys/arch/sparc64/dev/psycho.c @@ -1,4 +1,4 @@ -/* $OpenBSD: psycho.c,v 1.81 2022/10/16 01:22:39 jsg Exp $ */ +/* $OpenBSD: psycho.c,v 1.82 2023/02/04 19:19:37 cheloha Exp $ */ /* $NetBSD: psycho.c,v 1.39 2001/10/07 20:30:41 eeh Exp $ */ /* @@ -128,7 +128,6 @@ u_int stick_get_timecount(struct timecounter *); struct timecounter stick_timecounter = { .tc_get_timecount = stick_get_timecount, - .tc_poll_pps = NULL, .tc_counter_mask = ~0u, .tc_frequency = 0, .tc_name = "stick", diff --git a/sys/arch/sparc64/sparc64/clock.c b/sys/arch/sparc64/sparc64/clock.c index 8078f910f39..9656d3740a1 100644 --- a/sys/arch/sparc64/sparc64/clock.c +++ b/sys/arch/sparc64/sparc64/clock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clock.c,v 1.75 2023/01/13 03:22:18 cheloha Exp $ */ +/* $OpenBSD: clock.c,v 1.76 2023/02/04 19:19:37 cheloha Exp $ */ /* $NetBSD: clock.c,v 1.41 2001/07/24 19:29:25 eeh Exp $ */ /* @@ -112,7 +112,6 @@ u_int tick_get_timecount(struct timecounter *); struct timecounter tick_timecounter = { .tc_get_timecount = tick_get_timecount, - .tc_poll_pps = NULL, .tc_counter_mask = ~0u, .tc_frequency = 0, .tc_name = "tick", @@ -125,7 +124,6 @@ u_int sys_tick_get_timecount(struct timecounter *); struct timecounter sys_tick_timecounter = { .tc_get_timecount = sys_tick_get_timecount, - .tc_poll_pps = NULL, .tc_counter_mask = ~0u, .tc_frequency = 0, .tc_name = "sys_tick", diff --git a/sys/dev/acpi/acpihpet.c b/sys/dev/acpi/acpihpet.c index 50be09a17a3..dd992132678 100644 --- a/sys/dev/acpi/acpihpet.c +++ b/sys/dev/acpi/acpihpet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpihpet.c,v 1.30 2022/11/08 14:54:47 cheloha Exp $ */ +/* $OpenBSD: acpihpet.c,v 1.31 2023/02/04 19:19:37 cheloha Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert * @@ -43,7 +43,6 @@ void acpihpet_w(bus_space_tag_t _iot, bus_space_handle_t _ioh, static struct timecounter hpet_timecounter = { .tc_get_timecount = acpihpet_gettime, - .tc_poll_pps = 0, .tc_counter_mask = 0xffffffff, .tc_frequency = 0, .tc_name = 0, diff --git a/sys/dev/acpi/acpitimer.c b/sys/dev/acpi/acpitimer.c index 570402f730d..11a8b9eccf3 100644 --- a/sys/dev/acpi/acpitimer.c +++ b/sys/dev/acpi/acpitimer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpitimer.c,v 1.16 2022/08/25 17:43:34 cheloha Exp $ */ +/* $OpenBSD: acpitimer.c,v 1.17 2023/02/04 19:19:37 cheloha Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert * @@ -42,7 +42,6 @@ uint32_t acpitimer_read(struct acpitimer_softc *); static struct timecounter acpi_timecounter = { .tc_get_timecount = acpi_get_timecount, - .tc_poll_pps = 0, .tc_counter_mask = 0x00ffffff, /* 24 bits */ .tc_frequency = ACPI_FREQUENCY, .tc_name = 0, diff --git a/sys/dev/pci/amdpm.c b/sys/dev/pci/amdpm.c index c279af6b0f5..dc9202f7a73 100644 --- a/sys/dev/pci/amdpm.c +++ b/sys/dev/pci/amdpm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: amdpm.c,v 1.38 2022/03/11 18:00:45 mpi Exp $ */ +/* $OpenBSD: amdpm.c,v 1.39 2023/02/04 19:19:37 cheloha Exp $ */ /* * Copyright (c) 2006 Alexander Yurchenko @@ -78,7 +78,6 @@ u_int amdpm_get_timecount(struct timecounter *tc); static struct timecounter amdpm_timecounter = { .tc_get_timecount = amdpm_get_timecount, - .tc_poll_pps = 0, .tc_counter_mask = 0xffffff, .tc_frequency = AMDPM_FREQUENCY, .tc_name = "AMDPM", diff --git a/sys/dev/pci/viapm.c b/sys/dev/pci/viapm.c index a1c1c0f4403..2fc8f92cf55 100644 --- a/sys/dev/pci/viapm.c +++ b/sys/dev/pci/viapm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: viapm.c,v 1.21 2022/03/11 18:00:52 mpi Exp $ */ +/* $OpenBSD: viapm.c,v 1.22 2023/02/04 19:19:37 cheloha Exp $ */ /* * Copyright (c) 2005 Mark Kettenis @@ -173,7 +173,6 @@ u_int viapm_get_timecount(struct timecounter *tc); static struct timecounter viapm_timecounter = { .tc_get_timecount = viapm_get_timecount, - .tc_poll_pps = 0, .tc_counter_mask = 0xffffff, .tc_frequency = VIAPM_FREQUENCY, .tc_name = "VIAPM", diff --git a/sys/dev/pv/hyperv.c b/sys/dev/pv/hyperv.c index f57a5e366c1..08a713d814d 100644 --- a/sys/dev/pv/hyperv.c +++ b/sys/dev/pv/hyperv.c @@ -142,7 +142,6 @@ struct { struct timecounter hv_timecounter = { .tc_get_timecount = hv_gettime, - .tc_poll_pps = 0, .tc_counter_mask = 0xffffffff, .tc_frequency = 10000000, .tc_name = "hyperv", diff --git a/sys/dev/pv/pvclock.c b/sys/dev/pv/pvclock.c index c78a0fba98f..e696d95a10c 100644 --- a/sys/dev/pv/pvclock.c +++ b/sys/dev/pv/pvclock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pvclock.c,v 1.8 2021/11/05 11:38:29 mpi Exp $ */ +/* $OpenBSD: pvclock.c,v 1.9 2023/02/04 19:19:37 cheloha Exp $ */ /* * Copyright (c) 2018 Reyk Floeter @@ -75,7 +75,6 @@ struct cfdriver pvclock_cd = { struct timecounter pvclock_timecounter = { .tc_get_timecount = pvclock_get_timecount, - .tc_poll_pps = NULL, .tc_counter_mask = ~0u, .tc_frequency = 0, .tc_name = NULL, diff --git a/sys/kern/kern_tc.c b/sys/kern/kern_tc.c index 16cf1fa70b7..30022930a19 100644 --- a/sys/kern/kern_tc.c +++ b/sys/kern/kern_tc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_tc.c,v 1.81 2022/12/13 17:30:36 cheloha Exp $ */ +/* $OpenBSD: kern_tc.c,v 1.82 2023/02/04 19:19:36 cheloha Exp $ */ /* * Copyright (c) 2000 Poul-Henning Kamp @@ -56,7 +56,6 @@ dummy_get_timecount(struct timecounter *tc) static struct timecounter dummy_timecounter = { .tc_get_timecount = dummy_get_timecount, - .tc_poll_pps = NULL, .tc_counter_mask = ~0u, .tc_frequency = 1000000, .tc_name = "dummy", @@ -708,19 +707,6 @@ tc_windup(struct bintime *new_boottime, struct bintime *new_offset, th->th_offset = *new_offset; } -#ifdef notyet - /* - * Hardware latching timecounters may not generate interrupts on - * PPS events, so instead we poll them. There is a finite risk that - * the hardware might capture a count which is later than the one we - * got above, and therefore possibly in the next NTP second which might - * have a different rate than the current NTP second. It doesn't - * matter in practice. - */ - if (tho->th_counter->tc_poll_pps) - tho->th_counter->tc_poll_pps(tho->th_counter); -#endif - /* * If changing the boot time or clock adjustment, do so before * NTP processing. diff --git a/sys/sys/timetc.h b/sys/sys/timetc.h index d88b69809b0..f2ad3247958 100644 --- a/sys/sys/timetc.h +++ b/sys/sys/timetc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: timetc.h,v 1.13 2022/08/12 02:20:36 cheloha Exp $ */ +/* $OpenBSD: timetc.h,v 1.14 2023/02/04 19:19:35 cheloha Exp $ */ /* * Copyright (c) 2000 Poul-Henning Kamp @@ -44,7 +44,6 @@ struct timecounter; typedef u_int timecounter_get_t(struct timecounter *); -typedef void timecounter_pps_t(struct timecounter *); /* * Locks used to protect struct members in this file: @@ -60,13 +59,6 @@ struct timecounter { * mask any unimplemented bits out, as long as they are * constant. */ - timecounter_pps_t *tc_poll_pps; /* [I] */ - /* - * This function is optional. It will be called whenever the - * timecounter is rewound, and is intended to check for PPS - * events. Normal hardware does not need it but timecounters - * which latch PPS in hardware (like sys/pci/xrpu.c) do. - */ u_int tc_counter_mask; /* [I] */ /* This mask should mask off any unimplemented bits. */ u_int64_t tc_frequency; /* [I] */