On Sun, May 14, 2017 at 10:05:28PM +0200, Mark Kettenis wrote: > I tried to convert a few more architectures, and things get a bit > messier than I envisioned on architectures that have an optimized copy > function and care about alignment. Especially when copyin(9) is > implemented in assembly. So I implemented a new function called > copyin_futex(9), which is all we really need. The implementations for > powerpc and sparc64 below have been (lightly) tested. The regression > test that mpi@ created passes and doesn't crash the kernel! I have an > (untested) implementation for hppa as well. The amd64 and i386 > implementation can simply be a wrapper around copyin(9). The same > holds for all out non-MULTIPROCESSOR architectures. So my idea is to > let kern/sys_futex.c provide that wrapper if MULTIPROCESSOR isn't > defined and add an #ifdef MULTIPROCESSOR around all MD copyin_futex() > implementations. > > Thoughts?
This direction is much better than the previous one in my opinion.