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