The original implementation was based on OpenBSD under public domain
but just defined the functions to void.
FreeBSD later extended the file with more inline functions or dealing
with differences in Linux versions.
This rework tries to group some functions, adds properly typed arguments
and return values in some cases.
It further adjusts return values based on the !CONFIG_PM expectiations.
Lastly pr_debug() calls are added so we could see if/how much these
functions are used in new/other works rather than code just compiling
but the functions entirely being ignored without the knowledge of the
person porting code.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days