| Summary: | Add PPS_SYNC to GENERIC kernel configuration | ||
|---|---|---|---|
| Product: | Base System | Reporter: | John Hay <john> |
| Component: | conf | Assignee: | Konstantin Belousov <kib> |
| Status: | Closed FIXED | ||
| Severity: | Affects Some People | CC: | ian, imp, kib, phk |
| Priority: | --- | Keywords: | easy, feature |
| Version: | Unspecified | Flags: | koobs:
maintainer-feedback+
koobs: maintainer-feedback+ koobs: mfc-stable13? koobs: mfc-stable12? |
| Hardware: | Any | ||
| OS: | Any | ||
|
Description
John Hay
2021-10-10 06:29:38 UTC
OK with me. You may want to check with imp@ and gnn@ too? I will commit the following after tinderbox finishes. commit 3822304620c392fbef3e7bee197bf1f3b0860aed Author: Konstantin Belousov <kib@FreeBSD.org> Date: Sun Oct 10 15:20:45 2021 +0300 Enable PPS_SYNC on amd64, arm64 and armv7. Remove the option from NOTES/LINT. PR: 259036 Requested by: John Hay <john@sanren.ac.za> Sponsored by: The FreeBSD Foundation MFC after: 1 week diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC index 40c14e90aef0..f47b995beb2c 100644 --- a/sys/amd64/conf/GENERIC +++ b/sys/amd64/conf/GENERIC @@ -138,6 +138,12 @@ options PCI_IOV # PCI SR-IOV support options COMPAT_LINUXKPI +# Enable support for the kernel PLL to use an external PPS signal, +# under supervision of [x]ntpd(8) +# More info in ntpd documentation: http://www.eecis.udel.edu/~ntp + +options PPS_SYNC + # Floppy drives device fdc diff --git a/sys/arm/conf/std.armv7 b/sys/arm/conf/std.armv7 index 2d1dfa135780..fda291df289a 100644 --- a/sys/arm/conf/std.armv7 +++ b/sys/arm/conf/std.armv7 @@ -84,3 +84,9 @@ options VERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default #options KTR_VERBOSE=0 #options USB_REQ_DEBUG #options USB_VERBOSE + +# Enable support for the kernel PLL to use an external PPS signal, +# under supervision of [x]ntpd(8) +# More info in ntpd documentation: http://www.eecis.udel.edu/~ntp + +options PPS_SYNC diff --git a/sys/arm64/conf/std.arm64 b/sys/arm64/conf/std.arm64 index 8460d449939d..5c26f19b4299 100644 --- a/sys/arm64/conf/std.arm64 +++ b/sys/arm64/conf/std.arm64 @@ -96,3 +96,9 @@ options NETDUMP # netdump(4) client support # Make an SMP-capable kernel by default options SMP # Symmetric MultiProcessor Kernel + +# Enable support for the kernel PLL to use an external PPS signal, +# under supervision of [x]ntpd(8) +# More info in ntpd documentation: http://www.eecis.udel.edu/~ntp + +options PPS_SYNC diff --git a/sys/conf/NOTES b/sys/conf/NOTES index 39446fba06b3..e41b00edf2f6 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -1245,12 +1245,6 @@ options CAPABILITY_MODE # sandboxes with no global namespace access options HZ=100 -# Enable support for the kernel PLL to use an external PPS signal, -# under supervision of [x]ntpd(8) -# More info in ntpd documentation: http://www.eecis.udel.edu/~ntp - -options PPS_SYNC - # Enable support for generic feed-forward clocks in the kernel. # The feed-forward clock support is an alternative to the feedback oriented # ntpd/system clock approach, and is to be used with a feed-forward Removing it from NOTES means it won't build on powerpc and riscv64 at all. Are you sure that's what you want to do? A quick visual inspection suggests that this is fine. It does make time keeping a tiny bit more expensive, and the 'tiny bit' has gotten to be so small in the !pps case that this is fine. I'd be tempted to hold off committing until we hear from Ian, since he's the person most likely to know of issues compiling this in and then not feeding it a PPS. I don't see any, but this area of the tree has subtle side effects often enough that hearing from him, if he's not unduly delayed, would be prudent imho. I think this option has no practical use on ppc or riscv. I will wait for Ian to respond, for several days. (In reply to Konstantin Belousov from comment #4) We should keep it compiling, at least for riscv64. That's what NOTES is for. GPS devices do exist that you can connect to current riscv64 hardware, so it's relevant for that reason. I don't think any of them have the necessary FreeBSD support just yet, though. Adding it to at least sys/riscv64/conf/NOTES seems an easy way to keep this future proofed... (In reply to Warner Losh from comment #5) I added the option both to powerpc and riscv NOTES. I don't know of any downside to having OPTION PPS in the kernel and not using the feature other than a bit of wasted code space (which probably doesn't add up to more than 1-2kbytes). I don't understand the comment about PPS not being useful on ppc or riscv. You can feed a PPS pulse to a system on any gpio pin or serial port, including usb-serial adapters. If you use ftdi adapters you can get accuracies in the +- 50us range, cheaper brands still get you millisecond accuracy which is as good as a network connection). A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=e81e77c5a055d1cbf6d6a6f0acbaf443267aa84f commit e81e77c5a055d1cbf6d6a6f0acbaf443267aa84f Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2021-10-10 12:20:45 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2021-10-10 19:34:40 +0000 Enable PPS_SYNC on amd64, arm64 and armv7 Remove the option from NOTES/LINT, and add to NOTES for powerpc and riscv. PR: 259036 Requested by: John Hay <john@sanren.ac.za> Discussed with: ian, imp Sponsored by: The FreeBSD Foundation MFC after: 1 week sys/amd64/conf/GENERIC | 6 ++++++ sys/arm/conf/std.armv7 | 6 ++++++ sys/arm64/conf/std.arm64 | 6 ++++++ sys/conf/NOTES | 6 ------ sys/powerpc/conf/NOTES | 2 ++ sys/riscv/conf/NOTES | 2 ++ 6 files changed, 22 insertions(+), 6 deletions(-) ^Triage: Assign to committer resolving. If there's additional feedback still desired, please add using maintainer-feedback ? <email> Thank you for the tight turnaround everyone A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=c683063a00d0ff37afd16f7baf6d0a5e84e3a18f commit c683063a00d0ff37afd16f7baf6d0a5e84e3a18f Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2021-10-10 12:20:45 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2021-10-17 00:28:13 +0000 Enable PPS_SYNC on amd64, arm64 and armv7 PR: 259036 (cherry picked from commit e81e77c5a055d1cbf6d6a6f0acbaf443267aa84f) sys/amd64/conf/GENERIC | 6 ++++++ sys/arm/conf/std.armv7 | 6 ++++++ sys/arm64/conf/GENERIC | 2 ++ sys/conf/NOTES | 6 ------ sys/powerpc/conf/NOTES | 2 ++ sys/riscv/conf/NOTES | 2 ++ 6 files changed, 18 insertions(+), 6 deletions(-) |