[lkml]   [1997]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: csum_partial_copy_fromuser patch, #2
Jakub Jelinek <> 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).


 \ /
  Last update: 2005-03-22 13:38    [W:0.056 / U:1.852 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site