watchdog: clean up empty lines in .c and .h files
Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that arestill not MPSAFE (or already are but aren’t properly mark
Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that arestill not MPSAFE (or already are but aren’t properly marked).Use it in preparation for a general review of all nodes.This is non-functional change that adds annotations to SYSCTL_NODE andSYSCTL_PROC nodes using one of the soon-to-be-required flags.Mark all obvious cases as MPSAFE. All entries that haven't been markedas MPSAFE before are by default marked as NEEDGIANTApproved by: kib (mentor, blanket)Commented by: kib, gallatin, melifaroDifferential Revision: https://reviews.freebsd.org/D23718
show more ...
Extract eventfilter declarations to sys/_eventfilter.hThis allows replacing "sys/eventfilter.h" includes with "sys/_eventfilter.h"in other header files (e.g., sys/{bus,conf,cpu}.h) and reduces hea
Extract eventfilter declarations to sys/_eventfilter.hThis allows replacing "sys/eventfilter.h" includes with "sys/_eventfilter.h"in other header files (e.g., sys/{bus,conf,cpu}.h) and reduces headerpollution substantially.EVENTHANDLER_DECLARE and EVENTHANDLER_LIST_DECLAREs were moved out of .cfiles into appropriate headers (e.g., sys/proc.h, powernv/opal.h).As a side effect of reduced header pollution, many .c files and headers nolonger contain needed definitions. The remainder of the patch addressesadding appropriate includes to fix those files.LOCK_DEBUG and LOCK_FILE_LINE_ARG are moved to sys/_lock.h, as required bysys/mutex.h since r326106 (but silently protected by header pollution priorto this change).No functional change (intended). Of course, any out of tree modules thatrelied on header pollution for sys/eventhandler.h, sys/lock.h, orsys/mutex.h inclusion need to be fixed. __FreeBSD_version has been bumped.
make SW_WATCHDOG dynamicEnable the hardclock-based watchdog previously conditional on theSW_WATCHDOG option whenever hardware watchdogs are not found, andwatchdogd attempts to enable the watchdog
make SW_WATCHDOG dynamicEnable the hardclock-based watchdog previously conditional on theSW_WATCHDOG option whenever hardware watchdogs are not found, andwatchdogd attempts to enable the watchdog. The SW_WATCHDOG optionstill causes the sofware watchdog to be enabled even if there is ahardware watchdog. This does not change the other software-basedwatchdog enabled by the --softtimeout option to watchdogd.Note that the code to reprime the watchdog during kernel core dumps isno longer conditional on SW_WATCHDOG. I think this was previously a bug.Reviewed by: imp alfred bjkMFC after: 1 weekRelnotes: yesDifferential Revision: https://reviews.freebsd.org/D13713
sys/dev: further adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 2-Clause license, however the tool Iwas using misidentified many licenses so this was mostly a manual - error
sys/dev: further adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 2-Clause license, however the tool Iwas using misidentified many licenses so this was mostly a manual - errorprone - task.The Software Package Data Exchange (SPDX) group provides a specificationto make it easier for automated tools to detect and summarize well knownopensource licenses. We are gradually adopting the specification, notingthat the tags are considered only advisory and do not, in any way,superceed or replace the license texts.
Some cosmetic polishing for pre-timeouts.MFC after: 1 week
CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than tenyears for head. However, it is continuously misused as the mpsafe argumentfor callout_init(9). Deprecate the flag and cle
CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than tenyears for head. However, it is continuously misused as the mpsafe argumentfor callout_init(9). Deprecate the flag and clean up callout_init() callsto make them more consistent.Differential Revision: https://reviews.freebsd.org/D2613Reviewed by: jhbMFC after: 2 weeks
Add a missing include of an options header.watchdog.c does an #ifdef DDB but does not #include "opt_ddb.h".Fixing this turned up a missing include file.MFC after: 1 weekX-MFC-With: r261495, r27
Add a missing include of an options header.watchdog.c does an #ifdef DDB but does not #include "opt_ddb.h".Fixing this turned up a missing include file.MFC after: 1 weekX-MFC-With: r261495, r279410
Use right buffer to print to.PR: kern/176597Submitted by: Christoph Mallon <christoph mallon gmx de>MFC after: 2 weeks
Fix watchdog pretimeout.The original API calls for pow2ns, however the new APIs fromLinux call for seconds.We need to be able to convert to/from 2^Nns to seconds in bothuserland and kernel to f
Fix watchdog pretimeout.The original API calls for pow2ns, however the new APIs fromLinux call for seconds.We need to be able to convert to/from 2^Nns to seconds in bothuserland and kernel to fix this and properly compare units.
watchdogd(8) and watchdog(4) enhancements.The following support was added to watchdog(4):- Support to query the outstanding timeout.- Support to set a software pre-timeout function watchdog with
watchdogd(8) and watchdog(4) enhancements.The following support was added to watchdog(4):- Support to query the outstanding timeout.- Support to set a software pre-timeout function watchdog with an 'action'- Support to set a software only watchdog with a configurable 'action''action' can be a mask specifying a single operation or a combination of: log(9), printf(9), panic(9) and/or kdb_enter(9).Support the following in watchdogged:- Support to utilize the new additions to watchdog(4).- Support to warn if a watchdog script runs for too long.- Support for "dry run" where we do not actually arm the watchdog, but only report on our timing.Sponsored by: iXsystems, Inc.MFC after: 1 month
- Add the possibility to reuse the already last used timeout when patting the watchdog, via the watchdog(9) interface. For that, the WD_LASTVAL bitwise operation is used. It is mutually exclusi
- Add the possibility to reuse the already last used timeout when patting the watchdog, via the watchdog(9) interface. For that, the WD_LASTVAL bitwise operation is used. It is mutually exclusive with any explicit timout passing to the watchdogs. The last timeout can be returned via the wdog_kern_last_timeout() KPI.- Add the possibility to pat the watchdogs installed via the watchdog(9) interface from the kernel. In order to do that the new KPI wdog_kern_pat() is offered and it does accept normalized nanoseconds or WD_LASTVAL.- Avoid to pass WD_ACTIVE down in the watchdog handlers. All the control bit processing should over to the upper layer functions and not passed down to the handlers at all.These changes are intended to be used in order to fix up the watchdogtripping in situation when the userland is busted, but protection is stillwanted (examples: shutdown syncing / disk dumping).Sponsored by: Sandvine IncorporatedReviewed by: emaste, des, cognetMFC after: 2 weeks
Revisit the watchdogs: Resetting the error to EINVAL after failing to set thewatchdog might hide the succesful arming of an earlier one. Accept that onfailing to arm any watchdog (because of non-su
Revisit the watchdogs: Resetting the error to EINVAL after failing to set thewatchdog might hide the succesful arming of an earlier one. Accept that onfailing to arm any watchdog (because of non-supported timeouts) EOPNOTSUPP isreturned instead of the more appropriate EINVAL.MFC after: 3 days
Align the interfaces for the various watchdogs and make the interfacebehave as expected.Also:- Return an error if WD_PASSIVE is passed in to the ioctl as only WD_ACTIVE is implemented at the mo
Align the interfaces for the various watchdogs and make the interfacebehave as expected.Also:- Return an error if WD_PASSIVE is passed in to the ioctl as only WD_ACTIVE is implemented at the moment. See sys/watchdog.h for an explanation of the difference between WD_ACTIVE and WD_PASSIVE.- Remove the I_HAVE_TOTALLY_LOST_MY_SENSE_OF_HUMOR define. If you've lost your sense of humor, than don't add a define.Specific changes:i80321_wdog.c Don't roll your own passive watchdog tickle as this would defeat the purpose of an active (userland) watchdog tickle.ichwd.c / ipmi.c: WD_ACTIVE means active patting of the watchdog by a userland process, not whether the watchdog is active. See sys/watchdog.h.kern_clock.c: (software watchdog) Remove a check for WD_ACTIVE as this does not make sense here. This reverts r1.181.
Return zero when disabling watchdog, unless any of the drivers complain.
Do the dreaded s/dev_t/struct cdev */Bump __FreeBSD_version accordingly.
Add a generic watchdog facility which through a single device entryin /dev controls all available watchdog implementations.