jcs's openbsd hax
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@

cheloha 24ee467d c8bba2ca

+31 -89
+2 -9
share/man/man9/tc_init.9
··· 1 - .\" $OpenBSD: tc_init.9,v 1.10 2023/01/17 10:10:11 jsg Exp $ 1 + .\" $OpenBSD: tc_init.9,v 1.11 2023/02/04 19:19:36 cheloha Exp $ 2 2 .\" 3 3 .\" Copyright (c) 2004 Alexander Yurchenko <grange@openbsd.org> 4 4 .\" ··· 14 14 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 15 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 16 .\" 17 - .Dd $Mdocdate: January 17 2023 $ 17 + .Dd $Mdocdate: February 4 2023 $ 18 18 .Dt TC_INIT 9 19 19 .Os 20 20 .Sh NAME ··· 46 46 .Bd -literal -offset indent 47 47 struct timecounter { 48 48 timecounter_get_t *tc_get_timecount; 49 - timecounter_pps_t *tc_poll_pps; 50 49 u_int tc_counter_mask; 51 50 u_int64_t tc_frequency; 52 51 char *tc_name; ··· 64 63 This function reads the counter. 65 64 It is not required to mask any unimplemented bits out, as long as they 66 65 are constant. 67 - .It Ft void Fn (*tc_poll_pps) "struct timecounter *" 68 - This function is optional and can be set to NULL. 69 - It will be called whenever the timecounter is rewound, and is intended 70 - to check for PPS events. 71 - Normal hardware does not need it but timecounters which latch PPS in 72 - hardware do. 73 66 .It Va tc_counter_mask 74 67 This mask should mask off any unimplemented bits. 75 68 .It Va tc_frequency
+1 -2
sys/arch/alpha/alpha/clock.c
··· 1 - /* $OpenBSD: clock.c,v 1.26 2022/12/10 15:02:29 cheloha Exp $ */ 1 + /* $OpenBSD: clock.c,v 1.27 2023/02/04 19:19:36 cheloha Exp $ */ 2 2 /* $NetBSD: clock.c,v 1.29 2000/06/05 21:47:10 thorpej Exp $ */ 3 3 4 4 /* ··· 65 65 u_int rpcc_get_timecount(struct timecounter *); 66 66 struct timecounter rpcc_timecounter = { 67 67 .tc_get_timecount = rpcc_get_timecount, 68 - .tc_poll_pps = NULL, 69 68 .tc_counter_mask = ~0u, 70 69 .tc_frequency = 0, 71 70 .tc_name = "rpcc",
+1 -2
sys/arch/amd64/amd64/tsc.c
··· 1 - /* $OpenBSD: tsc.c,v 1.30 2022/10/24 00:56:33 cheloha Exp $ */ 1 + /* $OpenBSD: tsc.c,v 1.31 2023/02/04 19:19:36 cheloha Exp $ */ 2 2 /* 3 3 * Copyright (c) 2008 The NetBSD Foundation, Inc. 4 4 * Copyright (c) 2016,2017 Reyk Floeter <reyk@openbsd.org> ··· 49 49 50 50 struct timecounter tsc_timecounter = { 51 51 .tc_get_timecount = tsc_get_timecount_lfence, 52 - .tc_poll_pps = NULL, 53 52 .tc_counter_mask = ~0u, 54 53 .tc_frequency = 0, 55 54 .tc_name = "tsc",
+1 -2
sys/arch/amd64/isa/clock.c
··· 1 - /* $OpenBSD: clock.c,v 1.38 2022/11/08 17:34:13 cheloha Exp $ */ 1 + /* $OpenBSD: clock.c,v 1.39 2023/02/04 19:19:36 cheloha Exp $ */ 2 2 /* $NetBSD: clock.c,v 1.1 2003/04/26 18:39:50 fvdl Exp $ */ 3 3 4 4 /*- ··· 118 118 119 119 static struct timecounter i8254_timecounter = { 120 120 .tc_get_timecount = i8254_get_timecount, 121 - .tc_poll_pps = NULL, 122 121 .tc_counter_mask = ~0u, 123 122 .tc_frequency = TIMER_FREQ, 124 123 .tc_name = "i8254",
+1 -2
sys/arch/arm/cortex/agtimer.c
··· 1 - /* $OpenBSD: agtimer.c,v 1.16 2023/01/17 02:58:22 cheloha Exp $ */ 1 + /* $OpenBSD: agtimer.c,v 1.17 2023/02/04 19:19:36 cheloha Exp $ */ 2 2 /* 3 3 * Copyright (c) 2011 Dale Rahn <drahn@openbsd.org> 4 4 * Copyright (c) 2013 Patrick Wildt <patrick@blueri.se> ··· 45 45 46 46 static struct timecounter agtimer_timecounter = { 47 47 .tc_get_timecount = agtimer_get_timecount, 48 - .tc_poll_pps = NULL, 49 48 .tc_counter_mask = 0xffffffff, 50 49 .tc_frequency = 0, 51 50 .tc_name = "agtimer",
+1 -2
sys/arch/arm/cortex/amptimer.c
··· 1 - /* $OpenBSD: amptimer.c,v 1.15 2023/01/17 02:47:55 cheloha Exp $ */ 1 + /* $OpenBSD: amptimer.c,v 1.16 2023/02/04 19:19:36 cheloha Exp $ */ 2 2 /* 3 3 * Copyright (c) 2011 Dale Rahn <drahn@openbsd.org> 4 4 * ··· 67 67 68 68 static struct timecounter amptimer_timecounter = { 69 69 .tc_get_timecount = amptimer_get_timecount, 70 - .tc_poll_pps = NULL, 71 70 .tc_counter_mask = 0xffffffff, 72 71 .tc_frequency = 0, 73 72 .tc_name = "amptimer",
+1 -2
sys/arch/arm64/dev/agtimer.c
··· 1 - /* $OpenBSD: agtimer.c,v 1.21 2023/01/09 15:22:53 kettenis Exp $ */ 1 + /* $OpenBSD: agtimer.c,v 1.22 2023/02/04 19:19:36 cheloha Exp $ */ 2 2 /* 3 3 * Copyright (c) 2011 Dale Rahn <drahn@openbsd.org> 4 4 * Copyright (c) 2013 Patrick Wildt <patrick@blueri.se> ··· 47 47 48 48 static struct timecounter agtimer_timecounter = { 49 49 .tc_get_timecount = agtimer_get_timecount_default, 50 - .tc_poll_pps = NULL, 51 50 .tc_counter_mask = 0xffffffff, 52 51 .tc_frequency = 0, 53 52 .tc_name = "agtimer",
+1 -2
sys/arch/armv7/omap/dmtimer.c
··· 1 - /* $OpenBSD: dmtimer.c,v 1.17 2023/01/27 22:16:52 cheloha Exp $ */ 1 + /* $OpenBSD: dmtimer.c,v 1.18 2023/02/04 19:19:36 cheloha Exp $ */ 2 2 /* 3 3 * Copyright (c) 2007,2009 Dale Rahn <drahn@openbsd.org> 4 4 * Copyright (c) 2013 Raphael Graf <r@undefined.ch> ··· 109 109 110 110 static struct timecounter dmtimer_timecounter = { 111 111 .tc_get_timecount = dmtimer_get_timecount, 112 - .tc_poll_pps = NULL, 113 112 .tc_counter_mask = 0xffffffff, 114 113 .tc_frequency = 0, 115 114 .tc_name = "dmtimer",
+1 -2
sys/arch/armv7/omap/gptimer.c
··· 1 - /* $OpenBSD: gptimer.c,v 1.18 2023/01/25 14:14:39 cheloha Exp $ */ 1 + /* $OpenBSD: gptimer.c,v 1.19 2023/02/04 19:19:36 cheloha Exp $ */ 2 2 /* 3 3 * Copyright (c) 2007,2009 Dale Rahn <drahn@openbsd.org> 4 4 * ··· 111 111 112 112 static struct timecounter gptimer_timecounter = { 113 113 .tc_get_timecount = gptimer_get_timecount, 114 - .tc_poll_pps = NULL, 115 114 .tc_counter_mask = 0xffffffff, 116 115 .tc_frequency = 0, 117 116 .tc_name = "gptimer",
+1 -2
sys/arch/armv7/sunxi/sxitimer.c
··· 1 - /* $OpenBSD: sxitimer.c,v 1.19 2023/01/17 02:38:59 cheloha Exp $ */ 1 + /* $OpenBSD: sxitimer.c,v 1.20 2023/02/04 19:19:36 cheloha Exp $ */ 2 2 /* 3 3 * Copyright (c) 2007,2009 Dale Rahn <drahn@openbsd.org> 4 4 * Copyright (c) 2013 Raphael Graf <r@undefined.ch> ··· 87 87 88 88 static struct timecounter sxitimer_timecounter = { 89 89 .tc_get_timecount = sxitimer_get_timecount, 90 - .tc_poll_pps = NULL, 91 90 .tc_counter_mask = 0xffffffff, 92 91 .tc_frequency = 0, 93 92 .tc_name = "sxitimer",
+1 -2
sys/arch/hppa/dev/clock.c
··· 1 - /* $OpenBSD: clock.c,v 1.34 2023/01/20 17:18:08 cheloha Exp $ */ 1 + /* $OpenBSD: clock.c,v 1.35 2023/02/04 19:19:36 cheloha Exp $ */ 2 2 3 3 /* 4 4 * Copyright (c) 1998-2003 Michael Shalayeff ··· 55 55 56 56 struct timecounter itmr_timecounter = { 57 57 .tc_get_timecount = itmr_get_timecount, 58 - .tc_poll_pps = NULL, 59 58 .tc_counter_mask = 0xffffffff, 60 59 .tc_frequency = 0, 61 60 .tc_name = "itmr",
+1 -2
sys/arch/i386/isa/clock.c
··· 1 - /* $OpenBSD: clock.c,v 1.63 2023/01/30 10:49:05 jsg Exp $ */ 1 + /* $OpenBSD: clock.c,v 1.64 2023/02/04 19:19:36 cheloha Exp $ */ 2 2 /* $NetBSD: clock.c,v 1.39 1996/05/12 23:11:54 mycroft Exp $ */ 3 3 4 4 /*- ··· 129 129 130 130 static struct timecounter i8254_timecounter = { 131 131 .tc_get_timecount = i8254_get_timecount, 132 - .tc_poll_pps = NULL, 133 132 .tc_counter_mask = ~0u, 134 133 .tc_frequency = TIMER_FREQ, 135 134 .tc_name = "i8254",
+1 -2
sys/arch/i386/pci/geodesc.c
··· 1 - /* $OpenBSD: geodesc.c,v 1.17 2022/02/21 10:24:28 mpi Exp $ */ 1 + /* $OpenBSD: geodesc.c,v 1.18 2023/02/04 19:19:36 cheloha Exp $ */ 2 2 3 3 /* 4 4 * Copyright (c) 2003 Markus Friedl <markus@openbsd.org> ··· 61 61 62 62 struct timecounter geodesc_timecounter = { 63 63 .tc_get_timecount = geodesc_get_timecount, 64 - .tc_poll_pps = 0, 65 64 .tc_counter_mask = 0xffffffff, 66 65 .tc_frequency = 27000000, 67 66 .tc_name = "GEOTSC",
+1 -2
sys/arch/i386/pci/gscpm.c
··· 1 - /* $OpenBSD: gscpm.c,v 1.13 2022/02/21 10:24:28 mpi Exp $ */ 1 + /* $OpenBSD: gscpm.c,v 1.14 2023/02/04 19:19:36 cheloha Exp $ */ 2 2 /* 3 3 * Copyright (c) 2004 Alexander Yurchenko <grange@openbsd.org> 4 4 * ··· 51 51 52 52 struct timecounter gscpm_timecounter = { 53 53 .tc_get_timecount = gscpm_get_timecount, 54 - .tc_poll_pps = 0, 55 54 .tc_counter_mask = 0xffffff, 56 55 .tc_frequency = 3579545, 57 56 .tc_name = "GSCPM",
+1 -2
sys/arch/i386/pci/ichpcib.c
··· 1 - /* $OpenBSD: ichpcib.c,v 1.32 2023/01/30 10:49:05 jsg Exp $ */ 1 + /* $OpenBSD: ichpcib.c,v 1.33 2023/02/04 19:19:36 cheloha Exp $ */ 2 2 /* 3 3 * Copyright (c) 2004 Alexander Yurchenko <grange@openbsd.org> 4 4 * ··· 56 56 57 57 struct timecounter ichpcib_timecounter = { 58 58 .tc_get_timecount = ichpcib_get_timecount, 59 - .tc_poll_pps = 0, 60 59 .tc_counter_mask = 0xffffff, 61 60 .tc_frequency = 3579545, 62 61 .tc_name = "ICHPM",
+1 -2
sys/arch/loongson/loongson/generic3a_machdep.c
··· 1 - /* $OpenBSD: generic3a_machdep.c,v 1.11 2021/07/24 08:21:13 visa Exp $ */ 1 + /* $OpenBSD: generic3a_machdep.c,v 1.12 2023/02/04 19:19:36 cheloha Exp $ */ 2 2 3 3 /* 4 4 * Copyright (c) 2009, 2010, 2012 Miodrag Vallat. ··· 94 94 95 95 struct timecounter rs780e_timecounter = { 96 96 .tc_get_timecount = rs780e_get_timecount, 97 - .tc_poll_pps = NULL, 98 97 .tc_counter_mask = 0xffffffffu, /* truncated to 32 bits */ 99 98 .tc_frequency = HPET_FREQ, 100 99 .tc_name = "hpet",
+1 -2
sys/arch/macppc/macppc/clock.c
··· 1 - /* $OpenBSD: clock.c,v 1.52 2023/01/27 22:13:48 cheloha Exp $ */ 1 + /* $OpenBSD: clock.c,v 1.53 2023/02/04 19:19:36 cheloha Exp $ */ 2 2 /* $NetBSD: clock.c,v 1.1 1996/09/30 16:34:40 ws Exp $ */ 3 3 4 4 /* ··· 69 69 70 70 static struct timecounter tb_timecounter = { 71 71 .tc_get_timecount = tb_get_timecount, 72 - .tc_poll_pps = NULL, 73 72 .tc_counter_mask = 0xffffffff, 74 73 .tc_frequency = 0, 75 74 .tc_name = "tb",
+1 -2
sys/arch/mips64/mips64/mips64_machdep.c
··· 1 - /* $OpenBSD: mips64_machdep.c,v 1.40 2022/11/19 16:23:48 cheloha Exp $ */ 1 + /* $OpenBSD: mips64_machdep.c,v 1.41 2023/02/04 19:19:36 cheloha Exp $ */ 2 2 3 3 /* 4 4 * Copyright (c) 2009, 2010, 2012 Miodrag Vallat. ··· 251 251 252 252 struct timecounter cp0_timecounter = { 253 253 .tc_get_timecount = cp0_get_timecount, 254 - .tc_poll_pps = 0, 255 254 .tc_counter_mask = 0xffffffff, 256 255 .tc_frequency = 0, 257 256 .tc_name = "CP0",
+1 -2
sys/arch/octeon/octeon/machdep.c
··· 1 - /* $OpenBSD: machdep.c,v 1.135 2023/01/11 03:20:52 visa Exp $ */ 1 + /* $OpenBSD: machdep.c,v 1.136 2023/02/04 19:19:36 cheloha Exp $ */ 2 2 3 3 /* 4 4 * Copyright (c) 2009, 2010 Miodrag Vallat. ··· 149 149 150 150 struct timecounter ioclock_timecounter = { 151 151 .tc_get_timecount = ioclock_get_timecount, 152 - .tc_poll_pps = NULL, 153 152 .tc_counter_mask = 0xffffffff, /* truncated to 32 bits */ 154 153 .tc_frequency = 0, /* determined at runtime */ 155 154 .tc_name = "ioclock",
+1 -2
sys/arch/powerpc64/powerpc64/clock.c
··· 1 - /* $OpenBSD: clock.c,v 1.8 2023/01/27 22:14:43 cheloha Exp $ */ 1 + /* $OpenBSD: clock.c,v 1.9 2023/02/04 19:19:36 cheloha Exp $ */ 2 2 3 3 /* 4 4 * Copyright (c) 2020 Mark Kettenis <kettenis@openbsd.org> ··· 45 45 46 46 static struct timecounter tb_timecounter = { 47 47 .tc_get_timecount = tb_get_timecount, 48 - .tc_poll_pps = NULL, 49 48 .tc_counter_mask = 0xffffffff, 50 49 .tc_frequency = 0, 51 50 .tc_name = "tb",
+1 -2
sys/arch/riscv64/riscv64/clock.c
··· 1 - /* $OpenBSD: clock.c,v 1.8 2023/01/27 15:37:16 cheloha Exp $ */ 1 + /* $OpenBSD: clock.c,v 1.9 2023/02/04 19:19:37 cheloha Exp $ */ 2 2 3 3 /* 4 4 * Copyright (c) 2020 Mark Kettenis <kettenis@openbsd.org> ··· 48 48 49 49 static struct timecounter tb_timecounter = { 50 50 .tc_get_timecount = tb_get_timecount, 51 - .tc_poll_pps = NULL, 52 51 .tc_counter_mask = 0xffffffff, 53 52 .tc_frequency = 0, 54 53 .tc_name = "tb",
+1 -2
sys/arch/sparc64/dev/psycho.c
··· 1 - /* $OpenBSD: psycho.c,v 1.81 2022/10/16 01:22:39 jsg Exp $ */ 1 + /* $OpenBSD: psycho.c,v 1.82 2023/02/04 19:19:37 cheloha Exp $ */ 2 2 /* $NetBSD: psycho.c,v 1.39 2001/10/07 20:30:41 eeh Exp $ */ 3 3 4 4 /* ··· 128 128 129 129 struct timecounter stick_timecounter = { 130 130 .tc_get_timecount = stick_get_timecount, 131 - .tc_poll_pps = NULL, 132 131 .tc_counter_mask = ~0u, 133 132 .tc_frequency = 0, 134 133 .tc_name = "stick",
+1 -3
sys/arch/sparc64/sparc64/clock.c
··· 1 - /* $OpenBSD: clock.c,v 1.75 2023/01/13 03:22:18 cheloha Exp $ */ 1 + /* $OpenBSD: clock.c,v 1.76 2023/02/04 19:19:37 cheloha Exp $ */ 2 2 /* $NetBSD: clock.c,v 1.41 2001/07/24 19:29:25 eeh Exp $ */ 3 3 4 4 /* ··· 112 112 113 113 struct timecounter tick_timecounter = { 114 114 .tc_get_timecount = tick_get_timecount, 115 - .tc_poll_pps = NULL, 116 115 .tc_counter_mask = ~0u, 117 116 .tc_frequency = 0, 118 117 .tc_name = "tick", ··· 125 124 126 125 struct timecounter sys_tick_timecounter = { 127 126 .tc_get_timecount = sys_tick_get_timecount, 128 - .tc_poll_pps = NULL, 129 127 .tc_counter_mask = ~0u, 130 128 .tc_frequency = 0, 131 129 .tc_name = "sys_tick",
+1 -2
sys/dev/acpi/acpihpet.c
··· 1 - /* $OpenBSD: acpihpet.c,v 1.30 2022/11/08 14:54:47 cheloha Exp $ */ 1 + /* $OpenBSD: acpihpet.c,v 1.31 2023/02/04 19:19:37 cheloha Exp $ */ 2 2 /* 3 3 * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> 4 4 * ··· 43 43 44 44 static struct timecounter hpet_timecounter = { 45 45 .tc_get_timecount = acpihpet_gettime, 46 - .tc_poll_pps = 0, 47 46 .tc_counter_mask = 0xffffffff, 48 47 .tc_frequency = 0, 49 48 .tc_name = 0,
+1 -2
sys/dev/acpi/acpitimer.c
··· 1 - /* $OpenBSD: acpitimer.c,v 1.16 2022/08/25 17:43:34 cheloha Exp $ */ 1 + /* $OpenBSD: acpitimer.c,v 1.17 2023/02/04 19:19:37 cheloha Exp $ */ 2 2 /* 3 3 * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> 4 4 * ··· 42 42 43 43 static struct timecounter acpi_timecounter = { 44 44 .tc_get_timecount = acpi_get_timecount, 45 - .tc_poll_pps = 0, 46 45 .tc_counter_mask = 0x00ffffff, /* 24 bits */ 47 46 .tc_frequency = ACPI_FREQUENCY, 48 47 .tc_name = 0,
+1 -2
sys/dev/pci/amdpm.c
··· 1 - /* $OpenBSD: amdpm.c,v 1.38 2022/03/11 18:00:45 mpi Exp $ */ 1 + /* $OpenBSD: amdpm.c,v 1.39 2023/02/04 19:19:37 cheloha Exp $ */ 2 2 3 3 /* 4 4 * Copyright (c) 2006 Alexander Yurchenko <grange@openbsd.org> ··· 78 78 79 79 static struct timecounter amdpm_timecounter = { 80 80 .tc_get_timecount = amdpm_get_timecount, 81 - .tc_poll_pps = 0, 82 81 .tc_counter_mask = 0xffffff, 83 82 .tc_frequency = AMDPM_FREQUENCY, 84 83 .tc_name = "AMDPM",
+1 -2
sys/dev/pci/viapm.c
··· 1 - /* $OpenBSD: viapm.c,v 1.21 2022/03/11 18:00:52 mpi Exp $ */ 1 + /* $OpenBSD: viapm.c,v 1.22 2023/02/04 19:19:37 cheloha Exp $ */ 2 2 3 3 /* 4 4 * Copyright (c) 2005 Mark Kettenis <kettenis@openbsd.org> ··· 173 173 174 174 static struct timecounter viapm_timecounter = { 175 175 .tc_get_timecount = viapm_get_timecount, 176 - .tc_poll_pps = 0, 177 176 .tc_counter_mask = 0xffffff, 178 177 .tc_frequency = VIAPM_FREQUENCY, 179 178 .tc_name = "VIAPM",
-1
sys/dev/pv/hyperv.c
··· 142 142 143 143 struct timecounter hv_timecounter = { 144 144 .tc_get_timecount = hv_gettime, 145 - .tc_poll_pps = 0, 146 145 .tc_counter_mask = 0xffffffff, 147 146 .tc_frequency = 10000000, 148 147 .tc_name = "hyperv",
+1 -2
sys/dev/pv/pvclock.c
··· 1 - /* $OpenBSD: pvclock.c,v 1.8 2021/11/05 11:38:29 mpi Exp $ */ 1 + /* $OpenBSD: pvclock.c,v 1.9 2023/02/04 19:19:37 cheloha Exp $ */ 2 2 3 3 /* 4 4 * Copyright (c) 2018 Reyk Floeter <reyk@openbsd.org> ··· 75 75 76 76 struct timecounter pvclock_timecounter = { 77 77 .tc_get_timecount = pvclock_get_timecount, 78 - .tc_poll_pps = NULL, 79 78 .tc_counter_mask = ~0u, 80 79 .tc_frequency = 0, 81 80 .tc_name = NULL,
+1 -15
sys/kern/kern_tc.c
··· 1 - /* $OpenBSD: kern_tc.c,v 1.81 2022/12/13 17:30:36 cheloha Exp $ */ 1 + /* $OpenBSD: kern_tc.c,v 1.82 2023/02/04 19:19:36 cheloha Exp $ */ 2 2 3 3 /* 4 4 * Copyright (c) 2000 Poul-Henning Kamp <phk@FreeBSD.org> ··· 56 56 57 57 static struct timecounter dummy_timecounter = { 58 58 .tc_get_timecount = dummy_get_timecount, 59 - .tc_poll_pps = NULL, 60 59 .tc_counter_mask = ~0u, 61 60 .tc_frequency = 1000000, 62 61 .tc_name = "dummy", ··· 707 706 naptime = th->th_naptime.sec; 708 707 th->th_offset = *new_offset; 709 708 } 710 - 711 - #ifdef notyet 712 - /* 713 - * Hardware latching timecounters may not generate interrupts on 714 - * PPS events, so instead we poll them. There is a finite risk that 715 - * the hardware might capture a count which is later than the one we 716 - * got above, and therefore possibly in the next NTP second which might 717 - * have a different rate than the current NTP second. It doesn't 718 - * matter in practice. 719 - */ 720 - if (tho->th_counter->tc_poll_pps) 721 - tho->th_counter->tc_poll_pps(tho->th_counter); 722 - #endif 723 709 724 710 /* 725 711 * If changing the boot time or clock adjustment, do so before
+1 -9
sys/sys/timetc.h
··· 1 - /* $OpenBSD: timetc.h,v 1.13 2022/08/12 02:20:36 cheloha Exp $ */ 1 + /* $OpenBSD: timetc.h,v 1.14 2023/02/04 19:19:35 cheloha Exp $ */ 2 2 3 3 /* 4 4 * Copyright (c) 2000 Poul-Henning Kamp <phk@FreeBSD.org> ··· 44 44 45 45 struct timecounter; 46 46 typedef u_int timecounter_get_t(struct timecounter *); 47 - typedef void timecounter_pps_t(struct timecounter *); 48 47 49 48 /* 50 49 * Locks used to protect struct members in this file: ··· 59 58 * This function reads the counter. It is not required to 60 59 * mask any unimplemented bits out, as long as they are 61 60 * constant. 62 - */ 63 - timecounter_pps_t *tc_poll_pps; /* [I] */ 64 - /* 65 - * This function is optional. It will be called whenever the 66 - * timecounter is rewound, and is intended to check for PPS 67 - * events. Normal hardware does not need it but timecounters 68 - * which latch PPS in hardware (like sys/pci/xrpu.c) do. 69 61 */ 70 62 u_int tc_counter_mask; /* [I] */ 71 63 /* This mask should mask off any unimplemented bits. */