Re: csum_partial_copy_fromuser patch, #2

Tom May (ftom@netcom.com)
01 Feb 1997 21:20:27 -0800


Jakub Jelinek <jj@sunsite.ms.mff.cuni.cz> writes:

> If we don't want end up with two different codes for check/nocheck, which
> would be a wast of icache, I guess, then I think the best way would be to
> pass 0 as err to the asm routine, as you access the *err only in the
> exception handler - and there you have plenty of time to check whether err
> is NULL or not...

Yes, passing a constant vs. passing a computed address will be a
little quicker. And we really only need one implementation of
csum_partial_copy() because when we call it to do kernel->kernel
copies it will never cause an exception anyway so we might as well be
using the "check" version. Which also means we will never have to
test err for NULL in the exception handler because it will never be
called when err is NULL(!). We still probably want to wrap it with
inline functions similar to Ingo's current scheme (not the inside-out
way I suggested in my last message).

Tom.