Re: csum_partial_copy_fromuser patch, #2

Jakub Jelinek (
Sun, 2 Feb 1997 06:19:29 +0100 (MET)

> Regarding "I hope GCC will optimize 'dummy' away ...": it won't. It
> *must* pass a pointer to non-inline function
> csum_partial_copy_nocheck_generic(). It might work better to make
> csum_partial_copy_nocheck_generic() and its variations inline but put
> a non-inline wrapper around them, i.e., opposite of what you did. You
> will still have to do some hacks to stop the asm stuff from setting
> *err in the nocheck case though. It won't be pretty. You might end
> up giving up on using a common macro and just write the checked and
> unchecked cases out explicitly. It will probably make things more
> obvious.

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...

Anyway, am waiting on how the usage settles down before I write a sparc
Cheers .$$$$$:S
Jakub $"*$/"*$$
$.`$ . ^F
-------------------------------------------------------------- 4P+++"$"$ ---
Jakub Jelinek, :R"+ t$$B
Administrator of SunSITE Czech Republic ___# $$$
MFF, Charles University, Prague | | R$$k
---------------------------------------------------------- dd. | Linux $!$
Give your Sparc a new beginning - SparcLinux ddd | Sparc $9$F
-------------------------------------------------------- '!!!!!$ !!#!`
!!!!!* .!!!!!`
"~^^~ ^~~^