diff options
author | Sumit Semwal <sumit.semwal@linaro.org> | 2017-07-19 19:36:18 +0530 |
---|---|---|
committer | Sumit Semwal <sumit.semwal@linaro.org> | 2017-07-19 19:36:18 +0530 |
commit | 7cf1a5eb29f2bc49dc68cab3a18a2ef9f7d17eae (patch) | |
tree | 928c3d41a48145868d73ea4d5bca6a3eadf27c28 /arch/x86/lib/copy_user_64.S | |
parent | f5ec4ffd9c9ddf29aaf339a8619a5cd145f62342 (diff) | |
parent | 887265e6146544daadeecbf565e76e647435bd06 (diff) |
Merge remote-tracking branch 'stable-rc/linux-4.4.y' into 4.4.78-rc-hikey4.4-78-rc-hikey-20170719
Diffstat (limited to 'arch/x86/lib/copy_user_64.S')
-rw-r--r-- | arch/x86/lib/copy_user_64.S | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/x86/lib/copy_user_64.S b/arch/x86/lib/copy_user_64.S index 27f89c79a44b..423644c230e7 100644 --- a/arch/x86/lib/copy_user_64.S +++ b/arch/x86/lib/copy_user_64.S @@ -80,7 +80,7 @@ ENTRY(copy_user_generic_unrolled) movl %edx,%ecx andl $63,%edx shrl $6,%ecx - jz 17f + jz .L_copy_short_string 1: movq (%rsi),%r8 2: movq 1*8(%rsi),%r9 3: movq 2*8(%rsi),%r10 @@ -101,7 +101,8 @@ ENTRY(copy_user_generic_unrolled) leaq 64(%rdi),%rdi decl %ecx jnz 1b -17: movl %edx,%ecx +.L_copy_short_string: + movl %edx,%ecx andl $7,%edx shrl $3,%ecx jz 20f @@ -215,6 +216,8 @@ ENDPROC(copy_user_generic_string) */ ENTRY(copy_user_enhanced_fast_string) ASM_STAC + cmpl $64,%edx + jb .L_copy_short_string /* less then 64 bytes, avoid the costly 'rep' */ movl %edx,%ecx 1: rep movsb |