Home | History | Annotate | Download | only in sysmon
History log of /src/sys/dev/sysmon/swwdog.c
RevisionDateAuthorComments
 1.24  07-Nov-2024  rin swwdog: Use SYSCTL_DESCR() to comply with SYSCTL_INCLUDE_DESCR option
 1.23  31-Dec-2021  riastradh sysmon: Delete trailing whitespace. No functional change intended.
 1.22  16-Mar-2020  pgoyette Use the module subsystem's ability to process SYSCTL_SETUP() entries to
automate installation of sysctl nodes.

Note that there are still a number of device and pseudo-device modules
that create entries tied to individual device units, rather than to the
module itself. These are not changed.
 1.21  01-Jan-2020  thorpej - Introduce a new global kernel variable "shutting_down" to indicate that
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.
 1.20  27-Mar-2019  pgoyette Don't create the driver's workqueue twice!

The driver is modular, so its modcmd(MOULE_CMD_INIT) always gets called
whether or not the driver is built-in to the kernel. The modcmd init
code always calls swwdogattach() which creates the workqueue. Therefore
there's no need to also create it in swwdog_attach() (used to attach a
device instance).
 1.19  12-May-2015  pgoyette branches: 1.19.8; 1.19.18;
Finish work started in previous commit. Ensure that initialization
code is only called once for built-in variants of the module.
 1.18  12-May-2015  pgoyette Don't manipulate the autoconfig databases for built-in module.

Thanks, christos!
 1.17  24-Apr-2015  christos We only need the _cd when we are a module.
 1.16  23-Apr-2015  pgoyette Update module dependencies for all the existing modules that depend on sysmon components.
 1.15  18-Apr-2015  pgoyette Remove some debugging printf()s that were erroneously committed.
 1.14  18-Apr-2015  pgoyette Update attach/detach routines and provide MODULE interface.

Confirmed that atf tests (which run via rump) still pass, and also
confirmed that panic/reboot work in both monolithic kernel and
loaded module.
 1.13  13-Apr-2014  pgoyette branches: 1.13.4;
If we pmf_register on attach, we should pmf_deregister on detach.
 1.12  11-Nov-2010  pooka branches: 1.12.8; 1.12.18; 1.12.22; 1.12.32;
Apparently swwdog reboot hasn't worked in several years since it
tried to cpu_reboot() from a callout. Make it reboot from a workq
instead.

problem made manifest
by atf test
rumpfs unmount flush
caused issue to un-shush

tested: rump kernel (tests/dev/sysmon) and qemu
 1.11  06-Aug-2010  pooka * fix logic inversion in swwdog_reboot (and the sysctl).
* attach sysctl in constructor instead of as a link set to give it
a chance to work in a module
* teardown sysctl when driver is detached to avoid dangling pointer
 1.10  22-Jul-2010  pgoyette Convert swwdog(4) from a simple defpseudo device to a defpseudodev so
that we can attach a power management handler. The handler prevents
a suspend if the watchdog is active, to be consistent with other
watchdog drivers.

As discussed on tech-kern.
 1.9  31-Jan-2010  pooka branches: 1.9.2; 1.9.4;
print newline after timer expiry message
 1.8  30-Jan-2010  pooka Make swwdog use no-needs-count. As the manpage says, there can be only one.
 1.7  09-Jul-2007  ad branches: 1.7.32;
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
 1.6  29-Jan-2007  hubertf branches: 1.6.6; 1.6.8;
Remove more duplicate headers.
Patch by Slava Semushin <slava.semushin@gmail.com>

Again, this was tested by comparing obj files from a pristine and a patched
source tree against an i386/ALL kernel, and also for src/sbin/fsck_ffs,
src/sbin/fsdb and src/usr.sbin/makefs. Only changes in assert() line numbers
were detected in 'objdump -d' output.
 1.5  19-Dec-2006  smb Handle new gcc properly
 1.4  11-Dec-2005  christos branches: 1.4.20; 1.4.22;
merge ktrace-lwp.
 1.3  17-Oct-2005  simonb Spinkle some KNF.
 1.2  27-Feb-2005  perry branches: 1.2.4;
nuke trailing whitespace
 1.1  09-Jan-2005  smb branches: 1.1.2; 1.1.4; 1.1.6;
Add a software watchdog timer facility. Because this slightly
changes the "tickle" model of wdogctl(8), it was modified as well;
while I was in there, I cleaned up the argument parsing.

The code was reviewed by simonb@.
 1.1.6.1  19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.1.4.4  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.4.3  04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.1.4.2  17-Jan-2005  skrll Sync with HEAD.
 1.1.4.1  09-Jan-2005  skrll file swwdog.c was added on branch ktrace-lwp on 2005-01-17 19:31:52 +0000
 1.1.2.1  29-Apr-2005  kent sync with -current
 1.2.4.4  03-Sep-2007  yamt sync with head.
 1.2.4.3  26-Feb-2007  yamt sync with head.
 1.2.4.2  30-Dec-2006  yamt sync with head.
 1.2.4.1  21-Jun-2006  yamt sync with head.
 1.4.22.1  21-Dec-2006  yamt sync with head.
 1.4.20.2  01-Feb-2007  ad Sync with head.
 1.4.20.1  12-Jan-2007  ad Sync with head.
 1.6.8.1  11-Jul-2007  mjf Sync with head.
 1.6.6.1  01-Jul-2007  ad Adapt to callout API change.
 1.7.32.2  11-Aug-2010  yamt sync with head.
 1.7.32.1  11-Mar-2010  yamt sync with head
 1.9.4.1  05-Mar-2011  rmind sync with head
 1.9.2.1  17-Aug-2010  uebayasi Sync with HEAD.
 1.12.32.1  10-Aug-2014  tls Rebase.
 1.12.22.1  18-May-2014  rmind sync with head
 1.12.18.2  03-Dec-2017  jdolecek update from HEAD
 1.12.18.1  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.12.8.1  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.13.4.1  06-Jun-2015  skrll Sync with HEAD
 1.19.18.2  08-Apr-2020  martin Merge changes from current as of 20200406
 1.19.18.1  10-Jun-2019  christos Sync with HEAD
 1.19.8.2  17-May-2017  pgoyette Use correct variable name
 1.19.8.1  17-May-2017  pgoyette At suggestion of chuq@, modify config_attach_pseudo() to return with a
reference held on the device.

Adapt callers to expect the reference to exist, and to ensure that the
reference is released.

RSS XML Feed