When the SYSINIT and SYSUNINIT callback function argument is stored as a
pointer, it is difficult to preserve pointer type information. This
basically leads to several problems like having to use techniques similar
to DEVOLATILE() and DECONST(). By generation a small shim function
to call the callback function passing the provided arguments, type
safety can be achieved and the need for casts can be entirely avoided.
This change factors out all the SYSINIT and SYSUNINIT variants in kernel.h
into a common __SI_REGISTER() macro.
This change also update existing SYSINITs and SYSUNINTs to fix compilation
errors resulting from bad usage, like callback argument type issues and
also one instance of a SYSINIT and SYSUNINIT inside a function block,
Update the SYSINIT(9) manual page to reflect the changes made.
No functional change intended.
MFC after: 1 week
Sponsored by: NVIDIA Networking