Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754071AbbDPQQ7 (ORCPT ); Thu, 16 Apr 2015 12:16:59 -0400 Received: from terminus.zytor.com ([198.137.202.10]:46406 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752389AbbDPQQu (ORCPT ); Thu, 16 Apr 2015 12:16:50 -0400 Date: Thu, 16 Apr 2015 09:15:41 -0700 From: tip-bot for Chris Wilson Message-ID: Cc: mingo@kernel.org, chris@chris-wilson.co.uk, linux-kernel@vger.kernel.org, bp@alien8.de, hpa@zytor.com, tglx@linutronix.de, torvalds@linux-foundation.org Reply-To: torvalds@linux-foundation.org, tglx@linutronix.de, linux-kernel@vger.kernel.org, hpa@zytor.com, bp@alien8.de, chris@chris-wilson.co.uk, mingo@kernel.org In-Reply-To: <1429091486-11443-1-git-send-email-chris@chris-wilson.co.uk> References: <1429091486-11443-1-git-send-email-chris@chris-wilson.co.uk> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/asm] x86/asm: Enable fast 32-bit put_user_64() for copy_to_user() Git-Commit-ID: 6a907738ab9840ca3d71c22cd28fba4cbae7f7ce X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1892 Lines: 49 Commit-ID: 6a907738ab9840ca3d71c22cd28fba4cbae7f7ce Gitweb: http://git.kernel.org/tip/6a907738ab9840ca3d71c22cd28fba4cbae7f7ce Author: Chris Wilson AuthorDate: Wed, 15 Apr 2015 10:51:26 +0100 Committer: Ingo Molnar CommitDate: Thu, 16 Apr 2015 12:08:21 +0200 x86/asm: Enable fast 32-bit put_user_64() for copy_to_user() For fixed sized copies, copy_to_user() will utilize __put_user_size() fastpaths. However, it is missing the translation for 64-bit 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. Signed-off-by: Chris Wilson Cc: Borislav Petkov Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Thomas Gleixner Cc: intel-gfx@lists.freedesktop.org Link: http://lkml.kernel.org/r/1429091486-11443-1-git-send-email-chris@chris-wilson.co.uk Signed-off-by: Ingo Molnar --- 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 3c03a5d..0ed5504 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); -- 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/