TODO.compat-module revision 1.2 1 1.2 pgoyette /* $NetBSD: TODO.compat-module,v 1.2 2019/01/27 02:08:33 pgoyette Exp $ */
2 1.2 pgoyette
3 1.2 pgoyette DONE
4 1.2 pgoyette ----
5 1.2 pgoyette 1. Removed the building of the compat library - it is no longer needed.
6 1.2 pgoyette
7 1.2 pgoyette 2. Reverted some intentional auto-load breakage for loading the sysv_ipc
8 1.2 pgoyette module; the breakage was introduced as the fix for the above-mentioned
9 1.2 pgoyette build breakage.
10 1.2 pgoyette
11 1.2 pgoyette 3. Split the sysv_ipc compat routines into their own compat_sysv module.
12 1.2 pgoyette
13 1.2 pgoyette 4. Resolved some inter-module dependencies.
14 1.2 pgoyette
15 1.2 pgoyette 5. Extracted some net/if.c compat routines into the compat module, and
16 1.2 pgoyette replaced the originals with indirect (vectored) function calls.
17 1.2 pgoyette
18 1.2 pgoyette 6. Reconfirmed existing compat-module dependencies, and update the
19 1.2 pgoyette defopt/defflag lines in the config files* as needed, to insure that
20 1.2 pgoyette built-in dependencies get resolved.
21 1.2 pgoyette
22 1.2 pgoyette 7. Fixed limits on the number of module dependencies and maximum
23 1.2 pgoyette recursion level (for auto-loading) have been removed. Previous code
24 1.2 pgoyette for reporting module status to userland has been versioned and moved
25 1.2 pgoyette to the (new) compat_80 module.
26 1.2 pgoyette
27 1.2 pgoyette 8. The old monolithic compat module has been broken into multiple
28 1.2 pgoyette modules, one for each old NetBSD version. The monolithic compat
29 1.2 pgoyette module is no longer available.
30 1.2 pgoyette
31 1.2 pgoyette Similarly, the compat_sysv and compat_netbsd32 modules have also
32 1.2 pgoyette been split into several version-specific modules, and the mini-
33 1.2 pgoyette monolithic versions of these modules are no longer provided.
34 1.2 pgoyette
35 1.2 pgoyette 9. syscalls.master has been updated to autoload the version-specific
36 1.2 pgoyette compat modules rather than the monolithic modules.
37 1.2 pgoyette
38 1.2 pgoyette 10. Separated COMPAT_BSDPTY stuff, allowing the COMPAT_60 module to be
39 1.2 pgoyette built regardless.
40 1.2 pgoyette
41 1.2 pgoyette 11. Implemented a MP-safe mechanism for installing and removing function
42 1.2 pgoyette pointers, preventing them from being unloaded (via modunload) while
43 1.2 pgoyette in use. Thanks to riastradh@ for the template code.
44 1.2 pgoyette
45 1.2 pgoyette 12. Finished splitting the vnd_30 and vnd_50 compat code into separate
46 1.2 pgoyette modules.
47 1.2 pgoyette
48 1.2 pgoyette 13. Cleaned up some previous vectored routines (related to if_43.c) to
49 1.2 pgoyette use the MP-safe mechanism.
50 1.2 pgoyette
51 1.2 pgoyette 14. Organized (some of) the netbsd32 machine-dependent code to fit a
52 1.2 pgoyette common build framework, and split version-specific code from baseline
53 1.2 pgoyette code as needed. More work may be needed here (see #18 below).
54 1.2 pgoyette
55 1.2 pgoyette 15. The rtsock.c code has been split into two separate source files,
56 1.2 pgoyette one for use in -current and one which is shared with COMPAT_50 (the
57 1.2 pgoyette code is shared with -current, but macros are used to define version-
58 1.2 pgoyette specific routine names and variable types). Version-specific parts
59 1.2 pgoyette of rtsock.c for compat_14 and compat_70 have also been split out and
60 1.2 pgoyette included in the relevant version-specific compat modules.
61 1.2 pgoyette
62 1.2 pgoyette TODO - Not required for branch merge
63 1.2 pgoyette ------------------------------------
64 1.2 pgoyette 16. Audit the entire code base for any remaining embedded #ifdef's for
65 1.2 pgoyette COMPAT_xx. When found, move the actual compat code into the compat
66 1.2 pgoyette hierarchy and replace originals with indirect (vectored) calls.
67 1.2 pgoyette
68 1.2 pgoyette 17. The compat_60 module still needs some work for XEN systems. We
69 1.2 pgoyette probably need some build infrastructure changes to ensure that
70 1.2 pgoyette XEN (and, for i386, XEN-PAE) modules are build with the correct
71 1.2 pgoyette macros defined and with -I directories specified in the same order
72 1.2 pgoyette as for building kernels. See PR port-xen/53130. This currently
73 1.2 pgoyette prevents loading of micro-code updates for amd64 processors running
74 1.2 pgoyette XEN kernels. This limitation also exists on HEAD.
75 1.2 pgoyette
76 1.2 pgoyette 18. There seems to be quite a bit of MD compat_xx code, in the various
77 1.2 pgoyette sys/arch/ directories. I haven't yet looked at any of this. But it
78 1.2 pgoyette seems to me that the MI compat build infrastructure should have some
79 1.2 pgoyette mechanism to "reach over" to the MD code, #include a Makefile.inc file,
80 1.2 pgoyette and perhaps define something to enable the MI modcmd code to call a
81 1.2 pgoyette compat_xx_MD_init() routine.
82 1.2 pgoyette
83 1.2 pgoyette Note also that there are a few bits of MD code that is COMPAT_44
84 1.2 pgoyette related. (The only bit of MI COMPAT_44 code is in the single module
85 1.2 pgoyette shared by COMPAT_43 and COMPAT_09.) This affects the cesfic, hp300,
86 1.2 pgoyette news68k, and x68k platforms, all in their respective machdep.c
87 1.2 pgoyette source file. Additionally, the zaurus platform defines COMPAT_44 in
88 1.2 pgoyette its INSTALL kernel configuration - but no other configuration files!
89 1.2 pgoyette
90 1.2 pgoyette As far as I can tell, none of the MD compat code is currently built
91 1.2 pgoyette into the monolithic COMPAT module on HEAD. Thus, its absence from
92 1.2 pgoyette any of the version-specific modules is not a regression.
93 1.2 pgoyette
94 1.2 pgoyette 19. For compat_50, there are some things in dev/gpio and dev/wscons/wsmux
95 1.2 pgoyette that I haven't been able to cleanly separate. These items are not
96 1.2 pgoyette currently included in the monolithic COMPAT module on HEAD, so lack of
97 1.2 pgoyette integration on the branch is not a regression.
98 1.2 pgoyette
99 1.2 pgoyette 20. Find all the remaining dependencies on the compat_utils routines and
100 1.2 pgoyette deal with them appropriately. For now, we simply ensure that they
101 1.2 pgoyette are included in every kernel via 'options COMPAT_UTILS' in file
102 1.2 pgoyette sys/conf/std
103 1.2 pgoyette
104 1.2 pgoyette 21. The netbsd32_machine32_hook should be moved out of the main kernel
105 1.2 pgoyette and into the compat_netbsd32 module. Unfortunately there are some
106 1.2 pgoyette machines which include the consumer of this hook but do not have a
107 1.2 pgoyette compat_netbsd32 module (specifically, i386 and sgimips). This
108 1.2 pgoyette should be sorted out sometime soon, but does not block merging.
109 1.2 pgoyette
110 1.2 pgoyette 22. Note that the MPSAFE kernel option is currently not specified for
111 1.2 pgoyette building modules, nor is it included in any standard kernel
112 1.2 pgoyette configuration files. If you build a custom kernel with the MPSAFE
113 1.2 pgoyette option set, and you also use modules (especially those modules for
114 1.2 pgoyette network interface device drivers), you'll need to build custom
115 1.2 pgoyette modules, too. The MPSAFE stuff needs to be extracted out and made
116 1.2 pgoyette into "hooks".
117