Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754256AbbDOKJh (ORCPT ); Wed, 15 Apr 2015 06:09:37 -0400 Received: from hostedrelay.fireflyinternet.com ([109.228.30.76]:57025 "EHLO relay.fireflyinternet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751679AbbDOKJ2 (ORCPT ); Wed, 15 Apr 2015 06:09:28 -0400 X-Greylist: delayed 1061 seconds by postgrey-1.27 at vger.kernel.org; Wed, 15 Apr 2015 06:09:28 EDT X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.65.138; From: Chris Wilson To: intel-gfx@lists.freedesktop.org Cc: Chris Wilson , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] x86: Enable fast 32-bit put_user_64 for copy_to_user Date: Wed, 15 Apr 2015 10:51:26 +0100 Message-Id: <1429091486-11443-1-git-send-email-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.1.4 X-Authenticated-User: chris.alporthouse@surfanytime.net Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1305 Lines: 37 For fixed sized copies, copy_to_user() will utilize __put_user_size fastpaths. However, it is missing the translation for 64bit copies on x86/32. Testing on a Pinetrail Atom, the 64 bit put_user fastpath is substantially faster than the generic copy_to_user() fallback. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: x86@kernel.org CC: linux-kernel@vger.kernel.org --- arch/x86/include/asm/uaccess_32.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/x86/include/asm/uaccess_32.h b/arch/x86/include/asm/uaccess_32.h index 3c03a5de64d3..0ed5504c6060 100644 --- a/arch/x86/include/asm/uaccess_32.h +++ b/arch/x86/include/asm/uaccess_32.h @@ -59,6 +59,10 @@ __copy_to_user_inatomic(void __user *to, const void *from, unsigned long n) __put_user_size(*(u32 *)from, (u32 __user *)to, 4, ret, 4); return ret; + case 8: + __put_user_size(*(u64 *)from, (u64 __user *)to, + 8, ret, 8); + return ret; } } return __copy_to_user_ll(to, from, n); -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/