devfs: Change typedef 'cdevpriv_dtr_t' to 'd_priv_dtor_t'The original 'cdevpriv_dtr_t' typedef was not able to be used in afunction prototype like the other d_xxx_t typedef's, because it declared
devfs: Change typedef 'cdevpriv_dtr_t' to 'd_priv_dtor_t'The original 'cdevpriv_dtr_t' typedef was not able to be used in afunction prototype like the other d_xxx_t typedef's, because it declareda function *pointer* rather than a function. This makes it uselessoutside the cdevpriv implementation.Change the typedef to declare a function and rename it to'd_priv_dtor_t', which is more consistent with other dev_ops methods,although it's not a direct member in the dev_ops struct.Obtained-from: FreeBSD (revision 291653)URL: https://reviews.freebsd.org/D4340
show more ...
kernel - Fix /dev/fd/N and clean up the old dup error-code-driven path* When opening /dev/fd/N, replicate the file pointer for descriptors that represent vnodes instead of dup()ing. This ensures
kernel - Fix /dev/fd/N and clean up the old dup error-code-driven path* When opening /dev/fd/N, replicate the file pointer for descriptors that represent vnodes instead of dup()ing. This ensures that the seek offset and other fp-related elements are not shared unexpectedly.* Refactor the open() path to allow dev_dopen() to replace the struct file by passing a struct file ** instead of a struct file *. This removes old error-code-based hacks.* This fixes the shared seek position that fexecve() was operating with due to its use of /dev/fd/N for scripts.Reported-by: aly
kernel - Rewrite the callout_*() API* Rewrite the entire API from scratch and improve compatibility with FreeBSD. This is not an attempt to achieve full API compatibility, as FreeBSD's API has
kernel - Rewrite the callout_*() API* Rewrite the entire API from scratch and improve compatibility with FreeBSD. This is not an attempt to achieve full API compatibility, as FreeBSD's API has unnecessary complexity that coders would frequently make mistakes interpreting.* Remove the IPI mechanisms in favor of fine-grained spin-locks instead.* Add some robustness features in an attempt to track down corrupted callwheel lists due to originating subsystems freeing structures out from under an active callout.* The code supports a full-blown type-stable/adhoc-reuse structural separation between the front-end and the back-end, but this feature is currently not operational and may be removed at some future point. Instead we currently just embed the struct _callout inside the struct callout.* Replace callout_stop_sync() with callout_cancel().* callout_drain() is now implemented as a synchronous cancel instead of an asynchronous stop, which is closer to the FreeBSD API and expected operation for ported code (usb stack in particular). We will just have to fix any deadlocks which we come across.* Retain our callout_terminate() function as the 'better' way to stop using a callout, as it will not only cancel the callout but also de-flag the structure so it can no longer be used.
kernel: Change CFLAGS -> KCFLAGS also in commented out Makefile lines.
Clean up the USB driver directories, remove unbuilt source.Remove old source that has not (yet) been ported. If any of thesedrivers would get ported in the future, it would be from currentFreeBSD
Clean up the USB driver directories, remove unbuilt source.Remove old source that has not (yet) been ported. If any of thesedrivers would get ported in the future, it would be from currentFreeBSD source anyway. Keeping the old source around just confuseswhen grepping in /usr/src.
Fix a few typos across the tree.
build - Separate out CFLAGS for kernel & module build* Make COPTFLAGS apply to module builds in addition to kernel builds.* Implement a new make variable, KCFLAGS, for specifying overrides for
build - Separate out CFLAGS for kernel & module build* Make COPTFLAGS apply to module builds in addition to kernel builds.* Implement a new make variable, KCFLAGS, for specifying overrides for kernel and module builds.* Fixup the module build infrastructure to use KCFLAGS, and get rid of infiltration from the more generic CFLAGS onto the kernel & modules build.
kernel: Use NULL for pointers in DRIVER_MODULE* calls.
kernel/ipmi: Fix -Wundef.
sys/dev/misc/ipmi: Implement watchdog functionalityUnfortunately wdog(9) cannot handle how ipmi's watchdog works, sowe roll our own callout based solution.
kernel: Import the IPMI driver from FreeBSD.Many thanks to Markus Pfeiffer <profmakx@dragonflybsd.org> for testing,bug hunting and fixing the watchdog (this will be pushed in a separatecommit).