without any synchronization against changes by e.g. clock_settime().
- Replace with new getbinboottime() / getnanoboottime() / getmicroboottime()
functions (naming mirrors that of other time access functions in kern_tc.c).
It returns the (maybe-converted) value of timebasebin, which also tracks
our estimate of when the system was booted (i.e. the legacy "boottime" was
redundant).
XXX There needs to be a lockless synchronization mechanism for reading
timebasebin, but this is a problem in kern_tc.c that pre-existed these
"boottime" changes. At least now the problem is centralized in one location.
Fix below error for the time being.
The removed code is only relevant to Capsicum.
$ fstyp -l /dev/wd1
fstyp: exfat: iconv_open UCS-2LE: Invalid argument
Ported from DragonFlyBSD, but this target had originally existed in
Linux kernel. See below for details.
https://www.kernel.org/doc/Documentation/device-mapper/dm-flakey.txt
Due to two technical issues, this hasn't been hooked to dm.kmod yet.
1) "tick" in hz(9) not working.
2) Unable to use ->b_private in nestiobuf callback when it's already
used for mbp (see HAS_BUF_PRIV2).
taken-from: DragonFlyBSD
In the shutting_down case, we acquire the todr_mutex as a trylock. Under
most circumstances, this lock will be uncontended. But if we happen to
panic while accessing the TOD clock (via clock_settime() or whatever),
then trylock will prevent us from getting stuck (and a warning will be
displayed on the console).
the system is shutting down or rebooting.
- Set this global in a new function called kern_reboot(), which is currently
just a basic wrapper around cpu_reboot().
- Call kern_reboot() instead of cpu_reboot() almost everywhere; a few
places remain where it's still called directly, but those are in early
pre-main() machdep locations.
Eventually, all of the various cpu_reboot() functions should be re-factored
and common functionality moved to kern_reboot(), but that's for another day.
On _LP64, pad struct vm_amap to 128 bytes and use the additional space to
hold the arrays for tiny amaps which are common. Carefully size the array
allocations to avoid false sharing, and for smaller amaps try to share
allocated cache lines.
- Eliminate most contention due to amap_list: maintain the list in the pool
cache constructor / destructor like we do for struct file. Cache the
mutexes we allocate here.
- Don't do PR_WAITOK mutex allocations when NOWAIT has been specified.
- Add a mutex around the TODR, and provide lock/unlock/lock-owned
functions to manipulate it.
- Rename inittodr() to todr_set_systime() and resettodr() to
todr_save_systime() to better reflect what they do. These functions
are intended to be called with the TODR lock held, which will allow
for a pattern like:
-> todr_lock()
-> todr_save_systime()
-> [do machine-dependent stuff to sleep/suspend]
-> [magically awaken]
-> todr_set_systime(...)
-> todr_unlock()
- Provide historically-named wrappers inittodr() and resettodr() that
do the dance of acquiring / releasing the lock around the actual
substance.
NOTE: resettodr()'s use of the TODR lock is currently disabled (and
todr_save_systime() does not assert it's held) until such time as
issues around shutdown / reboot under duress can be addressed.
- As previously defined, it was not possible to return an error from the
back-end RTC driver. Make it a real function so that it can do so.
- Only the mc146818 and mk48txx drivers used it (for historical reasons).
Centralize the logic for how it's used in kern_todr.c (and make it private
to that file) for consistency.
with a zero page as argument.
MSan: Uninitialized Stack Memory In copyout() At Offset 0, Variable 'sb32' From compat_20_netbsd32_getfsstat()
MSan: Uninitialized Stack Memory In copyout() At Offset 12, Variable 'oss' From compat_43_sys_sigstack()
MSan: Uninitialized Stack Memory In copyout() At Offset 0, Variable 'sb' From compat_50_netbsd32___fhstat40()
"brcm,bcm2835-aux-uart" and returns the appropriate core clock based
results; otherwise it returns the uart clock from firmware.
Should fix early console output on the rpi0w.
Based on a diff from mlelstv