]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/mips/lib/memcpy.S
mips: get rid of tail-zeroing in primitives
[karo-tx-linux.git] / arch / mips / lib / memcpy.S
index c3031f18c572ebd529394208e5d51bc33f68e46e..3114a2ed1f4e54f797233f48d8793ba4ebfca21c 100644 (file)
        LOADK   t0, THREAD_BUADDR(t0)   # t0 is just past last good address
         nop
        SUB     len, AT, t0             # len number of uncopied bytes
-       bnez    t6, .Ldone\@    /* Skip the zeroing part if inatomic */
-       /*
-        * Here's where we rely on src and dst being incremented in tandem,
-        *   See (3) above.
-        * dst += (fault addr - src) to put dst at first byte to clear
-        */
-       ADD     dst, t0                 # compute start address in a1
-       SUB     dst, src
-       /*
-        * Clear len bytes starting at dst.  Can't call __bzero because it
-        * might modify len.  An inefficient loop for these rare times...
-        */
-       .set    reorder                         /* DADDI_WAR */
-       SUB     src, len, 1
-       beqz    len, .Ldone\@
-       .set    noreorder
-1:     sb      zero, 0(dst)
-       ADD     dst, dst, 1
-#ifndef CONFIG_CPU_DADDI_WORKAROUNDS
-       bnez    src, 1b
-        SUB    src, src, 1
-#else
-       .set    push
-       .set    noat
-       li      v1, 1
-       bnez    src, 1b
-        SUB    src, src, v1
-       .set    pop
-#endif
        jr      ra
         nop
 
-
 #define SEXC(n)                                                        \
        .set    reorder;                        /* DADDI_WAR */ \
 .Ls_exc_p ## n ## u\@:                                         \
@@ -672,15 +642,6 @@ LEAF(__rmemcpy)                                    /* a0=dst a1=src a2=len */
         move   a2, zero
        END(__rmemcpy)
 
-/*
- * t6 is used as a flag to note inatomic mode.
- */
-LEAF(__copy_user_inatomic)
-EXPORT_SYMBOL(__copy_user_inatomic)
-       b       __copy_user_common
-       li      t6, 1
-       END(__copy_user_inatomic)
-
 /*
  * A combined memcpy/__copy_user
  * __copy_user sets len to 0 for success; else to an upper bound of
@@ -694,8 +655,6 @@ EXPORT_SYMBOL(memcpy)
 .L__memcpy:
 FEXPORT(__copy_user)
 EXPORT_SYMBOL(__copy_user)
-       li      t6, 0   /* not inatomic */
-__copy_user_common:
        /* Legacy Mode, user <-> user */
        __BUILD_COPY_USER LEGACY_MODE USEROP USEROP
 
@@ -708,20 +667,12 @@ __copy_user_common:
  * space
  */
 
-LEAF(__copy_user_inatomic_eva)
-EXPORT_SYMBOL(__copy_user_inatomic_eva)
-       b       __copy_from_user_common
-       li      t6, 1
-       END(__copy_user_inatomic_eva)
-
 /*
  * __copy_from_user (EVA)
  */
 
 LEAF(__copy_from_user_eva)
 EXPORT_SYMBOL(__copy_from_user_eva)
-       li      t6, 0   /* not inatomic */
-__copy_from_user_common:
        __BUILD_COPY_USER EVA_MODE USEROP KERNELOP
 END(__copy_from_user_eva)