CRISv10 usercopy library add lineendings to asm
Removes warning when compiling arch/cris/arch-v10/lib/usercopy.c No change except adding \n\ on the end of the lines has been done. Removes warning about multi-line string literals. Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com> Cc: Mikael Starvik <mikael.starvik@axis.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
3eed639364
commit
2b05d2b3b4
|
@ -92,58 +92,58 @@ __copy_user (void __user *pdst, const void *psrc, unsigned long pn)
|
||||||
.ifnc %0%1%2%3,$r13$r11$r12$r10 \n\
|
.ifnc %0%1%2%3,$r13$r11$r12$r10 \n\
|
||||||
.err \n\
|
.err \n\
|
||||||
.endif \n\
|
.endif \n\
|
||||||
|
\n\
|
||||||
;; Save the registers we'll use in the movem process
|
;; Save the registers we'll use in the movem process \n\
|
||||||
;; on the stack.
|
;; on the stack. \n\
|
||||||
subq 11*4,$sp
|
subq 11*4,$sp \n\
|
||||||
movem $r10,[$sp]
|
movem $r10,[$sp] \n\
|
||||||
|
\n\
|
||||||
;; Now we've got this:
|
;; Now we've got this: \n\
|
||||||
;; r11 - src
|
;; r11 - src \n\
|
||||||
;; r13 - dst
|
;; r13 - dst \n\
|
||||||
;; r12 - n
|
;; r12 - n \n\
|
||||||
|
\n\
|
||||||
;; Update n for the first loop
|
;; Update n for the first loop \n\
|
||||||
subq 44,$r12
|
subq 44,$r12 \n\
|
||||||
|
\n\
|
||||||
; Since the noted PC of a faulting instruction in a delay-slot of a taken
|
; Since the noted PC of a faulting instruction in a delay-slot of a taken \n\
|
||||||
; branch, is that of the branch target, we actually point at the from-movem
|
; branch, is that of the branch target, we actually point at the from-movem \n\
|
||||||
; for this case. There is no ambiguity here; if there was a fault in that
|
; for this case. There is no ambiguity here; if there was a fault in that \n\
|
||||||
; instruction (meaning a kernel oops), the faulted PC would be the address
|
; instruction (meaning a kernel oops), the faulted PC would be the address \n\
|
||||||
; after *that* movem.
|
; after *that* movem. \n\
|
||||||
|
\n\
|
||||||
0:
|
0: \n\
|
||||||
movem [$r11+],$r10
|
movem [$r11+],$r10 \n\
|
||||||
subq 44,$r12
|
subq 44,$r12 \n\
|
||||||
bge 0b
|
bge 0b \n\
|
||||||
movem $r10,[$r13+]
|
movem $r10,[$r13+] \n\
|
||||||
1:
|
1: \n\
|
||||||
addq 44,$r12 ;; compensate for last loop underflowing n
|
addq 44,$r12 ;; compensate for last loop underflowing n \n\
|
||||||
|
\n\
|
||||||
;; Restore registers from stack
|
;; Restore registers from stack \n\
|
||||||
movem [$sp+],$r10
|
movem [$sp+],$r10 \n\
|
||||||
2:
|
2: \n\
|
||||||
.section .fixup,\"ax\"
|
.section .fixup,\"ax\" \n\
|
||||||
|
\n\
|
||||||
; To provide a correct count in r10 of bytes that failed to be copied,
|
; To provide a correct count in r10 of bytes that failed to be copied, \n\
|
||||||
; we jump back into the loop if the loop-branch was taken. There is no
|
; we jump back into the loop if the loop-branch was taken. There is no \n\
|
||||||
; performance penalty for sany use; the program will segfault soon enough.
|
; performance penalty for sany use; the program will segfault soon enough.\n\
|
||||||
|
\n\
|
||||||
3:
|
3: \n\
|
||||||
move.d [$sp],$r10
|
move.d [$sp],$r10 \n\
|
||||||
addq 44,$r10
|
addq 44,$r10 \n\
|
||||||
move.d $r10,[$sp]
|
move.d $r10,[$sp] \n\
|
||||||
jump 0b
|
jump 0b \n\
|
||||||
4:
|
4: \n\
|
||||||
movem [$sp+],$r10
|
movem [$sp+],$r10 \n\
|
||||||
addq 44,$r10
|
addq 44,$r10 \n\
|
||||||
addq 44,$r12
|
addq 44,$r12 \n\
|
||||||
jump 2b
|
jump 2b \n\
|
||||||
|
\n\
|
||||||
.previous
|
.previous \n\
|
||||||
.section __ex_table,\"a\"
|
.section __ex_table,\"a\" \n\
|
||||||
.dword 0b,3b
|
.dword 0b,3b \n\
|
||||||
.dword 1b,4b
|
.dword 1b,4b \n\
|
||||||
.previous"
|
.previous"
|
||||||
|
|
||||||
/* Outputs */ : "=r" (dst), "=r" (src), "=r" (n), "=r" (retn)
|
/* Outputs */ : "=r" (dst), "=r" (src), "=r" (n), "=r" (retn)
|
||||||
|
@ -253,59 +253,59 @@ __copy_user_zeroing (void __user *pdst, const void *psrc, unsigned long pn)
|
||||||
If you want to check that the allocation was right; then
|
If you want to check that the allocation was right; then
|
||||||
check the equalities in the first comment. It should say
|
check the equalities in the first comment. It should say
|
||||||
"r13=r13, r11=r11, r12=r12" */
|
"r13=r13, r11=r11, r12=r12" */
|
||||||
__asm__ volatile ("
|
__asm__ volatile ("\n\
|
||||||
.ifnc %0%1%2%3,$r13$r11$r12$r10 \n\
|
.ifnc %0%1%2%3,$r13$r11$r12$r10 \n\
|
||||||
.err \n\
|
.err \n\
|
||||||
.endif \n\
|
.endif \n\
|
||||||
|
\n\
|
||||||
;; Save the registers we'll use in the movem process
|
;; Save the registers we'll use in the movem process \n\
|
||||||
;; on the stack.
|
;; on the stack. \n\
|
||||||
subq 11*4,$sp
|
subq 11*4,$sp \n\
|
||||||
movem $r10,[$sp]
|
movem $r10,[$sp] \n\
|
||||||
|
\n\
|
||||||
;; Now we've got this:
|
;; Now we've got this: \n\
|
||||||
;; r11 - src
|
;; r11 - src \n\
|
||||||
;; r13 - dst
|
;; r13 - dst \n\
|
||||||
;; r12 - n
|
;; r12 - n \n\
|
||||||
|
\n\
|
||||||
;; Update n for the first loop
|
;; Update n for the first loop \n\
|
||||||
subq 44,$r12
|
subq 44,$r12 \n\
|
||||||
0:
|
0: \n\
|
||||||
movem [$r11+],$r10
|
movem [$r11+],$r10 \n\
|
||||||
1:
|
1: \n\
|
||||||
subq 44,$r12
|
subq 44,$r12 \n\
|
||||||
bge 0b
|
bge 0b \n\
|
||||||
movem $r10,[$r13+]
|
movem $r10,[$r13+] \n\
|
||||||
|
\n\
|
||||||
addq 44,$r12 ;; compensate for last loop underflowing n
|
addq 44,$r12 ;; compensate for last loop underflowing n \n\
|
||||||
|
\n\
|
||||||
;; Restore registers from stack
|
;; Restore registers from stack \n\
|
||||||
movem [$sp+],$r10
|
movem [$sp+],$r10 \n\
|
||||||
4:
|
4: \n\
|
||||||
.section .fixup,\"ax\"
|
.section .fixup,\"ax\" \n\
|
||||||
|
\n\
|
||||||
;; Do not jump back into the loop if we fail. For some uses, we get a
|
;; Do not jump back into the loop if we fail. For some uses, we get a \n\
|
||||||
;; page fault somewhere on the line. Without checking for page limits,
|
;; page fault somewhere on the line. Without checking for page limits, \n\
|
||||||
;; we don't know where, but we need to copy accurately and keep an
|
;; we don't know where, but we need to copy accurately and keep an \n\
|
||||||
;; accurate count; not just clear the whole line. To do that, we fall
|
;; accurate count; not just clear the whole line. To do that, we fall \n\
|
||||||
;; down in the code below, proceeding with smaller amounts. It should
|
;; down in the code below, proceeding with smaller amounts. It should \n\
|
||||||
;; be kept in mind that we have to cater to code like what at one time
|
;; be kept in mind that we have to cater to code like what at one time \n\
|
||||||
;; was in fs/super.c:
|
;; was in fs/super.c: \n\
|
||||||
;; i = size - copy_from_user((void *)page, data, size);
|
;; i = size - copy_from_user((void *)page, data, size); \n\
|
||||||
;; which would cause repeated faults while clearing the remainder of
|
;; which would cause repeated faults while clearing the remainder of \n\
|
||||||
;; the SIZE bytes at PAGE after the first fault.
|
;; the SIZE bytes at PAGE after the first fault. \n\
|
||||||
;; A caveat here is that we must not fall through from a failing page
|
;; A caveat here is that we must not fall through from a failing page \n\
|
||||||
;; to a valid page.
|
;; to a valid page. \n\
|
||||||
|
\n\
|
||||||
3:
|
3: \n\
|
||||||
movem [$sp+],$r10
|
movem [$sp+],$r10 \n\
|
||||||
addq 44,$r12 ;; Get back count before faulting point.
|
addq 44,$r12 ;; Get back count before faulting point. \n\
|
||||||
subq 44,$r11 ;; Get back pointer to faulting movem-line.
|
subq 44,$r11 ;; Get back pointer to faulting movem-line. \n\
|
||||||
jump 4b ;; Fall through, pretending the fault didn't happen.
|
jump 4b ;; Fall through, pretending the fault didn't happen.\n\
|
||||||
|
\n\
|
||||||
.previous
|
.previous \n\
|
||||||
.section __ex_table,\"a\"
|
.section __ex_table,\"a\" \n\
|
||||||
.dword 1b,3b
|
.dword 1b,3b \n\
|
||||||
.previous"
|
.previous"
|
||||||
|
|
||||||
/* Outputs */ : "=r" (dst), "=r" (src), "=r" (n), "=r" (retn)
|
/* Outputs */ : "=r" (dst), "=r" (src), "=r" (n), "=r" (retn)
|
||||||
|
@ -425,64 +425,64 @@ __do_clear_user (void __user *pto, unsigned long pn)
|
||||||
If you want to check that the allocation was right; then
|
If you want to check that the allocation was right; then
|
||||||
check the equalities in the first comment. It should say
|
check the equalities in the first comment. It should say
|
||||||
something like "r13=r13, r11=r11, r12=r12". */
|
something like "r13=r13, r11=r11, r12=r12". */
|
||||||
__asm__ volatile ("
|
__asm__ volatile ("\n\
|
||||||
.ifnc %0%1%2,$r13$r12$r10 \n\
|
.ifnc %0%1%2,$r13$r12$r10 \n\
|
||||||
.err \n\
|
.err \n\
|
||||||
.endif \n\
|
.endif \n\
|
||||||
|
\n\
|
||||||
;; Save the registers we'll clobber in the movem process
|
;; Save the registers we'll clobber in the movem process \n\
|
||||||
;; on the stack. Don't mention them to gcc, it will only be
|
;; on the stack. Don't mention them to gcc, it will only be \n\
|
||||||
;; upset.
|
;; upset. \n\
|
||||||
subq 11*4,$sp
|
subq 11*4,$sp \n\
|
||||||
movem $r10,[$sp]
|
movem $r10,[$sp] \n\
|
||||||
|
\n\
|
||||||
clear.d $r0
|
clear.d $r0 \n\
|
||||||
clear.d $r1
|
clear.d $r1 \n\
|
||||||
clear.d $r2
|
clear.d $r2 \n\
|
||||||
clear.d $r3
|
clear.d $r3 \n\
|
||||||
clear.d $r4
|
clear.d $r4 \n\
|
||||||
clear.d $r5
|
clear.d $r5 \n\
|
||||||
clear.d $r6
|
clear.d $r6 \n\
|
||||||
clear.d $r7
|
clear.d $r7 \n\
|
||||||
clear.d $r8
|
clear.d $r8 \n\
|
||||||
clear.d $r9
|
clear.d $r9 \n\
|
||||||
clear.d $r10
|
clear.d $r10 \n\
|
||||||
clear.d $r11
|
clear.d $r11 \n\
|
||||||
|
\n\
|
||||||
;; Now we've got this:
|
;; Now we've got this: \n\
|
||||||
;; r13 - dst
|
;; r13 - dst \n\
|
||||||
;; r12 - n
|
;; r12 - n \n\
|
||||||
|
\n\
|
||||||
;; Update n for the first loop
|
;; Update n for the first loop \n\
|
||||||
subq 12*4,$r12
|
subq 12*4,$r12 \n\
|
||||||
0:
|
0: \n\
|
||||||
subq 12*4,$r12
|
subq 12*4,$r12 \n\
|
||||||
bge 0b
|
bge 0b \n\
|
||||||
movem $r11,[$r13+]
|
movem $r11,[$r13+] \n\
|
||||||
1:
|
1: \n\
|
||||||
addq 12*4,$r12 ;; compensate for last loop underflowing n
|
addq 12*4,$r12 ;; compensate for last loop underflowing n\n\
|
||||||
|
\n\
|
||||||
;; Restore registers from stack
|
;; Restore registers from stack \n\
|
||||||
movem [$sp+],$r10
|
movem [$sp+],$r10 \n\
|
||||||
2:
|
2: \n\
|
||||||
.section .fixup,\"ax\"
|
.section .fixup,\"ax\" \n\
|
||||||
3:
|
3: \n\
|
||||||
move.d [$sp],$r10
|
move.d [$sp],$r10 \n\
|
||||||
addq 12*4,$r10
|
addq 12*4,$r10 \n\
|
||||||
move.d $r10,[$sp]
|
move.d $r10,[$sp] \n\
|
||||||
clear.d $r10
|
clear.d $r10 \n\
|
||||||
jump 0b
|
jump 0b \n\
|
||||||
|
\n\
|
||||||
4:
|
4: \n\
|
||||||
movem [$sp+],$r10
|
movem [$sp+],$r10 \n\
|
||||||
addq 12*4,$r10
|
addq 12*4,$r10 \n\
|
||||||
addq 12*4,$r12
|
addq 12*4,$r12 \n\
|
||||||
jump 2b
|
jump 2b \n\
|
||||||
|
\n\
|
||||||
.previous
|
.previous \n\
|
||||||
.section __ex_table,\"a\"
|
.section __ex_table,\"a\" \n\
|
||||||
.dword 0b,3b
|
.dword 0b,3b \n\
|
||||||
.dword 1b,4b
|
.dword 1b,4b \n\
|
||||||
.previous"
|
.previous"
|
||||||
|
|
||||||
/* Outputs */ : "=r" (dst), "=r" (n), "=r" (retn)
|
/* Outputs */ : "=r" (dst), "=r" (n), "=r" (retn)
|
||||||
|
|
Loading…
Reference in New Issue