From: Andi Kleen Date: Fri, 16 Aug 2013 21:17:19 +0000 (-0700) Subject: x86: Add 1/2/4/8 byte optimization to 64bit __copy_{from,to}_user_inatomic X-Git-Tag: v3.2.81~40 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=733037c3c89b259235ff5217096b1c846fe7e6e2;p=pandora-kernel.git x86: Add 1/2/4/8 byte optimization to 64bit __copy_{from,to}_user_inatomic commit ff47ab4ff3cddfa7bc1b25b990e24abe2ae474ff upstream. The 64bit __copy_{from,to}_user_inatomic always called copy_from_user_generic, but skipped the special optimizations for 1/2/4/8 byte accesses. This especially hurts the futex call, which accesses the 4 byte futex user value with a complicated fast string operation in a function call, instead of a single movl. Use __copy_{from,to}_user for _inatomic instead to get the same optimizations. The only problem was the might_fault() in those functions. So move that to new wrapper and call __copy_{f,t}_user_nocheck() from *_inatomic directly. 32bit already did this correctly by duplicating the code. Signed-off-by: Andi Kleen Link: http://lkml.kernel.org/r/1376687844-19857-2-git-send-email-andi@firstfloor.org Signed-off-by: H. Peter Anvin Signed-off-by: Ben Hutchings Cc: Jaccon Bastiaansen Cc: Thomas Gleixner Cc: mingo@redhat.com Cc: Peter Zijlstra Cc: h.zuidam@computer.org --- Reading git-diff-tree failed