We cannot avoid all of the device goop, since a non-built-in-module would still have to merge in the devsw. My goal is to eventually be able to build and run a kernel which has no portion of sysmon built-in, and still be able to load and unload the wdog/power/envsys components, along with the actual drivers for timers/power-switches/sensors.
It's really not all that complicated. On Tue, 28 Apr 2015, Taylor R Campbell wrote:
Date: Thu, 23 Apr 2015 23:22:03 +0000 From: Paul Goyette <pgoyette%NetBSD.org@localhost> Modularize sysmon and its components Why does this introduce a sysmon(4) autoconf device? It seems like needless bookkeeping -- you could just make the mutex global, like all the state it protects, and skip all the match/attach/detach/cfdriver autoconf business.
------------------------------------------------------------------------- | Paul Goyette | PGP Key fingerprint: | E-mail addresses: | | (Retired) | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com | | Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd.org | -------------------------------------------------------------------------