Merge tag 'perf-tools-for-v5.15-2021-09-11' of git://git.kernel.org/pub/scm/linux...
[linux-2.6-microblaze.git] / arch / parisc / lib / lusercopy.S
index 36d6a86..b428d29 100644 (file)
 #include <asm/errno.h>
 #include <linux/linkage.h>
 
-       /*
-        * get_sr gets the appropriate space value into
-        * sr1 for kernel/user space access, depending
-        * on the flag stored in the task structure.
-        */
-
-       .macro  get_sr
-       mfctl       %cr30,%r1
-       ldw         TI_SEGMENT(%r1),%r22
-       mfsp        %sr3,%r1
-       or,<>       %r22,%r0,%r0
-       copy        %r0,%r1
-       mtsp        %r1,%sr1
-       .endm
-
        /*
         * unsigned long lclear_user(void *to, unsigned long n)
         *
 
 ENTRY_CFI(lclear_user)
        comib,=,n   0,%r25,$lclu_done
-       get_sr
 $lclu_loop:
        addib,<>    -1,%r25,$lclu_loop
-1:      stbs,ma     %r0,1(%sr1,%r26)
+1:     stbs,ma     %r0,1(%sr3,%r26)
 
 $lclu_done:
        bv          %r0(%r2)
@@ -67,40 +51,6 @@ $lclu_done:
 ENDPROC_CFI(lclear_user)
 
 
-       /*
-        * long lstrnlen_user(char *s, long n)
-        *
-        * Returns 0 if exception before zero byte or reaching N,
-        *         N+1 if N would be exceeded,
-        *         else strlen + 1 (i.e. includes zero byte).
-        */
-
-ENTRY_CFI(lstrnlen_user)
-       comib,=     0,%r25,$lslen_nzero
-       copy        %r26,%r24
-       get_sr
-1:      ldbs,ma     1(%sr1,%r26),%r1
-$lslen_loop:
-       comib,=,n   0,%r1,$lslen_done
-       addib,<>    -1,%r25,$lslen_loop
-2:      ldbs,ma     1(%sr1,%r26),%r1
-$lslen_done:
-       bv          %r0(%r2)
-       sub         %r26,%r24,%r28
-
-$lslen_nzero:
-       b           $lslen_done
-       ldo         1(%r26),%r26 /* special case for N == 0 */
-
-3:      b          $lslen_done
-       copy        %r24,%r26    /* reset r26 so 0 is returned on fault */
-
-       ASM_EXCEPTIONTABLE_ENTRY(1b,3b)
-       ASM_EXCEPTIONTABLE_ENTRY(2b,3b)
-
-ENDPROC_CFI(lstrnlen_user)
-
-
 /*
  * unsigned long pa_memcpy(void *dstp, const void *srcp, unsigned long len)
  *