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