On 04/29/2011 07:05 PM, Andi Kleen wrote:
> Do you think the following case would not differ so much
> from (1' 2') ?
>
> walk_addr_generic() ---1''
> copy_from_user() ---2''
Yes it should be the same and is cleaner.
If you do a make .../foo.i and look at the code coming out of the
preprocessor you'll see it expands to a
if (!__builtin_constant_p(size))
return copy_user_generic(dst, (__force void *)src, size);
switch (size) {
case 1:__get_user_asm(*(u8 *)dst, (u8 __user *)src,
ret, "b", "b", "=q", 1);
return ret;
case 2: ..
case 4: ..
case 8: ..
case 10: ..
case 16: ..
}
Ok it looks like the 32bit kernel only handles 1/2/4. Maybe that
was the problem if you ran on 32bit.
I'm happy with a slower copy_from_user() for that particular case.
--
error compiling committee.c: too many arguments to function
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html