freebsd-skq/sys
Ian Lepore a8d7b9d3bb Support multiple realtime clocks, and remove locking/sleeping restrictions
on clock drivers.

This tracks multiple concurrent realtime clock drivers in a list sorted by
clock resolution.  When system time changes (and periodically) the
clock_settime() methods of all registered clocks are invoked.

To initialize system time, each driver is tried in turn from best to worst
resolution, until one succesfully returns a valid time.

The code no longer holds a mutex while calling the clock_settime() and
clock_gettime() methods of the registered clocks. This allows clock drivers
to do whatever kind of locking or sleeping is necessary (this is especially
important for i2c clock chips since i2c drivers often need to sleep).

A new clock_register_flags() function allows the clock driver to pass
flags. The flags currently defined help support drivers that use their own
techniques to avoid roundoff errors (prevents the 4/5 rounding done by the
subr_rtc code). A driver which may need to wait for resources (such as bus
ownership) may pass a flag to indicate that it will obtain system time for
itself after waiting for resources; this is merely an optimization to avoid
the common code retrieving a timespec that will never get used.

Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D11484
2017-07-12 02:53:54 +00:00
..
amd64 Protect access to the AT realtime clock with its own mutex. 2017-07-12 02:42:57 +00:00
arm Add external PLATFORM access on arm, and use it in the pl310 driver. 2017-07-11 16:30:16 +00:00
arm64 arm64: Add Allwinner I2C controller to GENERIC kernel 2017-07-09 12:53:02 +00:00
boot dts: arm: Fix our local patches for H3 2017-07-09 13:56:34 +00:00
bsm Commit the 64-bit inode project. 2017-05-23 09:29:05 +00:00
cam Move mmc_parmas to the end of the structure for better compatability. 2017-07-10 21:55:19 +00:00
cddl fix an architectural problem introduced in r320156, ZFS ABD import 2017-06-28 13:59:20 +00:00
compat Add some functions to math64.h in the LinuxKPI, and fix nearby style. 2017-07-09 23:14:51 +00:00
conf Add external PLATFORM access on arm, and use it in the pl310 driver. 2017-07-11 16:30:16 +00:00
contrib Avoid including list.h in LinuxKPI headers. 2017-06-18 16:43:57 +00:00
crypto Remove register keyword from sys/ and ANSIfy prototypes 2017-05-17 00:34:34 +00:00
ddb Include opt files in the kernel with "" instead of <>. 2017-07-10 05:08:01 +00:00
dev Fix error check for Rx mbuf allocation in ENA driver 2017-07-10 22:11:30 +00:00
fs Consistently use vop_stdpathconf() for default pathconf values. 2017-07-11 21:55:20 +00:00
gdb
geom Add GEOM::descr attribute for symmetry with GEOM::ident. 2017-07-06 08:36:14 +00:00
gnu Update DTS files from Linux 4.12 2017-07-09 13:53:32 +00:00
i386 Fix handling of one more possible exception on return to usermode. 2017-07-08 11:07:39 +00:00
isa Protect access to the AT realtime clock with its own mutex. 2017-07-12 02:42:57 +00:00
kern Support multiple realtime clocks, and remove locking/sleeping restrictions 2017-07-12 02:53:54 +00:00
kgssapi
libkern arm64: add ".arch armv8-a+crc" to allow use of crc instructions 2017-06-08 20:06:09 +00:00
mips Make ddb(4) disassembler (x/i) use n32 register names. 2017-07-06 15:08:51 +00:00
modules Add dependency on opt_cam.h and opt_mmccam.h 2017-07-10 03:38:07 +00:00
net iflib - flib_busdma_load_mbuf_sg used isc_tx_maxsize as max semgent size. 2017-07-03 19:23:45 +00:00
net80211 net80211: initialize i_seq for A-MPDU frames. 2017-06-01 20:46:43 +00:00
netgraph Check return value from soaccept(). 2017-06-14 16:13:20 +00:00
netinet Don't overpromote values when calculating len in tcp_output(). 2017-07-05 16:10:30 +00:00
netinet6 Fix an unnecessary/incorrect check in the PKTOPT_EXTHDRCPY macro. 2017-05-30 14:50:28 +00:00
netipsec Build kdebug_secreplay() function only when IPSEC_DEBUG is defined. 2017-06-01 10:04:12 +00:00
netpfil pf: Fix vnet purging 2017-07-09 17:56:39 +00:00
netsmb
nfs Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
nfsclient Add an NFSv4.1 mount option for "use one openowner". 2017-04-13 21:54:19 +00:00
nfsserver Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
nlm Commit the 64-bit inode project. 2017-05-23 09:29:05 +00:00
ofed Avoid including list.h in LinuxKPI headers. 2017-06-18 16:43:57 +00:00
opencrypto Use const with some read-only buffers in opencrypto APIs. 2017-05-09 18:28:42 +00:00
powerpc Remove an obsolete comment 2017-07-05 02:20:03 +00:00
riscv Clean up MD pollution of bus_dma.h: 2017-07-01 05:35:29 +00:00
rpc Listening sockets improvements. 2017-06-08 21:30:34 +00:00
security Correct bitwise test in mac_bsdextended ugidfw_rule_valid() 2017-06-13 01:17:58 +00:00
sparc64 Clean up MD pollution of bus_dma.h: 2017-07-01 05:35:29 +00:00
sys Support multiple realtime clocks, and remove locking/sleeping restrictions 2017-07-12 02:53:54 +00:00
teken Oops, my fix for bright colors broke bright black some more (in cases 2017-03-27 10:48:28 +00:00
tests style(9): sort headers 2017-05-09 05:08:47 +00:00
tools make.conf: Add the possibility to use another DTC 2017-06-17 23:34:53 +00:00
ufs Consistently use vop_stdpathconf() for default pathconf values. 2017-07-11 21:55:20 +00:00
vm Fix loop termination in vm_map_find_min(). 2017-07-09 15:41:49 +00:00
x86 Protect access to the AT realtime clock with its own mutex. 2017-07-12 02:42:57 +00:00
xdr * limit size of buffers to RPC_MAXDATASIZE 2017-06-01 06:12:25 +00:00
xen xenstore: fix suspension when using the xenstore device 2017-03-07 09:17:48 +00:00
Makefile Remove glimpse make target added in r181432 2017-05-22 15:53:30 +00:00