]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
Merge branches 'x86-apic-for-linus', 'x86-asm-for-linus' and 'x86-cleanups-for-linus...
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 20 May 2011 00:49:35 +0000 (17:49 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 20 May 2011 00:49:35 +0000 (17:49 -0700)
* 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86, apic: Print verbose error interrupt reason on apic=debug

* 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86: Demacro CONFIG_PARAVIRT cpu accessors

* 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86: Fix mrst sparse complaints
  x86: Fix spelling error in the memcpy() source code comment
  x86, mpparse: Remove unnecessary variable

1  2  3  4 
arch/x86/lib/memcpy_64.S

diff --combined arch/x86/lib/memcpy_64.S
index daab21dae2d17ac407f7a0c862b63a08e41b8785,75ef61e35e38aee1cf62b05a48f1add62b148f98,75ef61e35e38aee1cf62b05a48f1add62b148f98,2a560bb2573b01bb3ac39211de00066319819fd4..efbf2a0ecdea85a41566f01d05d14e14177e7145
@@@@@ -4,7 -4,6 -4,6 -4,6 +4,7 @@@@@
    
    #include <asm/cpufeature.h>
    #include <asm/dwarf2.h>
 +++#include <asm/alternative-asm.h>
    
    /*
     * memcpy - Copy a memory block.
    .Lmemcpy_e:
        .previous
    
 +++/*
 +++ * memcpy_c_e() - enhanced fast string memcpy. This is faster and simpler than
 +++ * memcpy_c. Use memcpy_c_e when possible.
 +++ *
 +++ * This gets patched over the unrolled variant (below) via the
 +++ * alternative instructions framework:
 +++ */
 +++    .section .altinstr_replacement, "ax", @progbits
 +++.Lmemcpy_c_e:
 +++    movq %rdi, %rax
 +++
 +++    movl %edx, %ecx
 +++    rep movsb
 +++    ret
 +++.Lmemcpy_e_e:
 +++    .previous
 +++
    ENTRY(__memcpy)
    ENTRY(memcpy)
        CFI_STARTPROC
        jb .Lhandle_tail
    
        /*
---      * We check whether memory false dependece could occur,
+++      * We check whether memory false dependence could occur,
         * then jump to corresponding copy mode.
         */
        cmp  %dil, %sil
@@@@@ -189,22 -171,21 -171,21 -171,21 +189,22 @@@@@ ENDPROC(memcpy
    ENDPROC(__memcpy)
    
        /*
 ---     * Some CPUs run faster using the string copy instructions.
 ---     * It is also a lot simpler. Use this when possible:
 ---     */
 ---
 ---    .section .altinstructions, "a"
 ---    .align 8
 ---    .quad memcpy
 ---    .quad .Lmemcpy_c
 ---    .word X86_FEATURE_REP_GOOD
 ---
 ---    /*
 +++     * Some CPUs are adding enhanced REP MOVSB/STOSB feature
 +++     * If the feature is supported, memcpy_c_e() is the first choice.
 +++     * If enhanced rep movsb copy is not available, use fast string copy
 +++     * memcpy_c() when possible. This is faster and code is simpler than
 +++     * original memcpy().
 +++     * Otherwise, original memcpy() is used.
 +++     * In .altinstructions section, ERMS feature is placed after REG_GOOD
 +++         * feature to implement the right patch order.
 +++     *
         * Replace only beginning, memcpy is used to apply alternatives,
         * so it is silly to overwrite itself with nops - reboot is the
         * only outcome...
         */
 ---    .byte .Lmemcpy_e - .Lmemcpy_c
 ---    .byte .Lmemcpy_e - .Lmemcpy_c
 +++    .section .altinstructions, "a"
 +++    altinstruction_entry memcpy,.Lmemcpy_c,X86_FEATURE_REP_GOOD,\
 +++                         .Lmemcpy_e-.Lmemcpy_c,.Lmemcpy_e-.Lmemcpy_c
 +++    altinstruction_entry memcpy,.Lmemcpy_c_e,X86_FEATURE_ERMS, \
 +++                         .Lmemcpy_e_e-.Lmemcpy_c_e,.Lmemcpy_e_e-.Lmemcpy_c_e
        .previous