compat/sunos code. besides being cleaner this allows the sunos LKM to properly work without any special kernel hacks.