TODO.compat-module revision 1.2
11.2Spgoyette/* $NetBSD: TODO.compat-module,v 1.2 2019/01/27 02:08:33 pgoyette Exp $ */ 21.2Spgoyette 31.2SpgoyetteDONE 41.2Spgoyette---- 51.2Spgoyette1. Removed the building of the compat library - it is no longer needed. 61.2Spgoyette 71.2Spgoyette2. Reverted some intentional auto-load breakage for loading the sysv_ipc 81.2Spgoyette module; the breakage was introduced as the fix for the above-mentioned 91.2Spgoyette build breakage. 101.2Spgoyette 111.2Spgoyette3. Split the sysv_ipc compat routines into their own compat_sysv module. 121.2Spgoyette 131.2Spgoyette4. Resolved some inter-module dependencies. 141.2Spgoyette 151.2Spgoyette5. Extracted some net/if.c compat routines into the compat module, and 161.2Spgoyette replaced the originals with indirect (vectored) function calls. 171.2Spgoyette 181.2Spgoyette6. Reconfirmed existing compat-module dependencies, and update the 191.2Spgoyette defopt/defflag lines in the config files* as needed, to insure that 201.2Spgoyette built-in dependencies get resolved. 211.2Spgoyette 221.2Spgoyette7. Fixed limits on the number of module dependencies and maximum 231.2Spgoyette recursion level (for auto-loading) have been removed. Previous code 241.2Spgoyette for reporting module status to userland has been versioned and moved 251.2Spgoyette to the (new) compat_80 module. 261.2Spgoyette 271.2Spgoyette8. The old monolithic compat module has been broken into multiple 281.2Spgoyette modules, one for each old NetBSD version. The monolithic compat 291.2Spgoyette module is no longer available. 301.2Spgoyette 311.2Spgoyette Similarly, the compat_sysv and compat_netbsd32 modules have also 321.2Spgoyette been split into several version-specific modules, and the mini- 331.2Spgoyette monolithic versions of these modules are no longer provided. 341.2Spgoyette 351.2Spgoyette9. syscalls.master has been updated to autoload the version-specific 361.2Spgoyette compat modules rather than the monolithic modules. 371.2Spgoyette 381.2Spgoyette10. Separated COMPAT_BSDPTY stuff, allowing the COMPAT_60 module to be 391.2Spgoyette built regardless. 401.2Spgoyette 411.2Spgoyette11. Implemented a MP-safe mechanism for installing and removing function 421.2Spgoyette pointers, preventing them from being unloaded (via modunload) while 431.2Spgoyette in use. Thanks to riastradh@ for the template code. 441.2Spgoyette 451.2Spgoyette12. Finished splitting the vnd_30 and vnd_50 compat code into separate 461.2Spgoyette modules. 471.2Spgoyette 481.2Spgoyette13. Cleaned up some previous vectored routines (related to if_43.c) to 491.2Spgoyette use the MP-safe mechanism. 501.2Spgoyette 511.2Spgoyette14. Organized (some of) the netbsd32 machine-dependent code to fit a 521.2Spgoyette common build framework, and split version-specific code from baseline 531.2Spgoyette code as needed. More work may be needed here (see #18 below). 541.2Spgoyette 551.2Spgoyette15. The rtsock.c code has been split into two separate source files, 561.2Spgoyette one for use in -current and one which is shared with COMPAT_50 (the 571.2Spgoyette code is shared with -current, but macros are used to define version- 581.2Spgoyette specific routine names and variable types). Version-specific parts 591.2Spgoyette of rtsock.c for compat_14 and compat_70 have also been split out and 601.2Spgoyette included in the relevant version-specific compat modules. 611.2Spgoyette 621.2SpgoyetteTODO - Not required for branch merge 631.2Spgoyette------------------------------------ 641.2Spgoyette16. Audit the entire code base for any remaining embedded #ifdef's for 651.2Spgoyette COMPAT_xx. When found, move the actual compat code into the compat 661.2Spgoyette hierarchy and replace originals with indirect (vectored) calls. 671.2Spgoyette 681.2Spgoyette17. The compat_60 module still needs some work for XEN systems. We 691.2Spgoyette probably need some build infrastructure changes to ensure that 701.2Spgoyette XEN (and, for i386, XEN-PAE) modules are build with the correct 711.2Spgoyette macros defined and with -I directories specified in the same order 721.2Spgoyette as for building kernels. See PR port-xen/53130. This currently 731.2Spgoyette prevents loading of micro-code updates for amd64 processors running 741.2Spgoyette XEN kernels. This limitation also exists on HEAD. 751.2Spgoyette 761.2Spgoyette18. There seems to be quite a bit of MD compat_xx code, in the various 771.2Spgoyette sys/arch/ directories. I haven't yet looked at any of this. But it 781.2Spgoyette seems to me that the MI compat build infrastructure should have some 791.2Spgoyette mechanism to "reach over" to the MD code, #include a Makefile.inc file, 801.2Spgoyette and perhaps define something to enable the MI modcmd code to call a 811.2Spgoyette compat_xx_MD_init() routine. 821.2Spgoyette 831.2Spgoyette Note also that there are a few bits of MD code that is COMPAT_44 841.2Spgoyette related. (The only bit of MI COMPAT_44 code is in the single module 851.2Spgoyette shared by COMPAT_43 and COMPAT_09.) This affects the cesfic, hp300, 861.2Spgoyette news68k, and x68k platforms, all in their respective machdep.c 871.2Spgoyette source file. Additionally, the zaurus platform defines COMPAT_44 in 881.2Spgoyette its INSTALL kernel configuration - but no other configuration files! 891.2Spgoyette 901.2Spgoyette As far as I can tell, none of the MD compat code is currently built 911.2Spgoyette into the monolithic COMPAT module on HEAD. Thus, its absence from 921.2Spgoyette any of the version-specific modules is not a regression. 931.2Spgoyette 941.2Spgoyette19. For compat_50, there are some things in dev/gpio and dev/wscons/wsmux 951.2Spgoyette that I haven't been able to cleanly separate. These items are not 961.2Spgoyette currently included in the monolithic COMPAT module on HEAD, so lack of 971.2Spgoyette integration on the branch is not a regression. 981.2Spgoyette 991.2Spgoyette20. Find all the remaining dependencies on the compat_utils routines and 1001.2Spgoyette deal with them appropriately. For now, we simply ensure that they 1011.2Spgoyette are included in every kernel via 'options COMPAT_UTILS' in file 1021.2Spgoyette sys/conf/std 1031.2Spgoyette 1041.2Spgoyette21. The netbsd32_machine32_hook should be moved out of the main kernel 1051.2Spgoyette and into the compat_netbsd32 module. Unfortunately there are some 1061.2Spgoyette machines which include the consumer of this hook but do not have a 1071.2Spgoyette compat_netbsd32 module (specifically, i386 and sgimips). This 1081.2Spgoyette should be sorted out sometime soon, but does not block merging. 1091.2Spgoyette 1101.2Spgoyette22. Note that the MPSAFE kernel option is currently not specified for 1111.2Spgoyette building modules, nor is it included in any standard kernel 1121.2Spgoyette configuration files. If you build a custom kernel with the MPSAFE 1131.2Spgoyette option set, and you also use modules (especially those modules for 1141.2Spgoyette network interface device drivers), you'll need to build custom 1151.2Spgoyette modules, too. The MPSAFE stuff needs to be extracted out and made 1161.2Spgoyette into "hooks". 117