URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Subversion Repositories or1k
[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [arch/] [s390/] [lib/] [uaccess.S] - Rev 1765
Compare with Previous | Blame | View Log
/** arch/s390/lib/uaccess.S* __copy_{from|to}_user functions.** s390* Copyright (C) 2000,2002 IBM Deutschland Entwicklung GmbH, IBM Corporation* Authors(s): Martin Schwidefsky (schwidefsky@de.ibm.com)** These functions have standard call interface*/#include <asm/lowcore.h>.text.align 4.globl __copy_from_user_asm__copy_from_user_asm:lr %r5,%r3sacf 5120: mvcle %r2,%r4,0jo 0b1: sacf 0lr %r2,%r5br %r142: lhi %r1,-4096lr %r3,%r4slr %r3,%r1 # %r3 = %r4 + 4096nr %r3,%r1 # %r3 = (%r4 + 4096) & -4096slr %r3,%r4 # %r3 = #bytes to next user page boundaryclr %r5,%r3 # copy crosses next page boundary ?jnh 1b # no, this page fauled# The page after the current user page might have faulted.# We cant't find out which page because the program check handler# might have callled schedule, destroying all lowcore information.# We retry with the shortened length.3: mvcle %r2,%r4,0jo 3bj 1b.section __ex_table,"a".long 0b,2b.long 3b,1b.previous.align 4.text.globl __copy_to_user_asm__copy_to_user_asm:lr %r5,%r3sacf 5120: mvcle %r4,%r2,0jo 0b1: sacf 0lr %r2,%r3br %r142: lhi %r1,-4096lr %r5,%r4slr %r5,%r1 # %r5 = %r4 + 4096nr %r5,%r1 # %r5 = (%r4 + 4096) & -4096slr %r5,%r4 # %r5 = #bytes to next user page boundaryclr %r3,%r5 # copy crosses next page boundary ?jnh 1b # no, the current page fauled# The page after the current user page might have faulted.# We cant't find out which page because the program check handler# might have callled schedule, destroying all lowcore information.# We retry with the shortened length.3: mvcle %r4,%r2,0jo 3bj 1b.section __ex_table,"a".long 0b,2b.long 3b,1b.previous.align 4.text.globl __clear_user_asm__clear_user_asm:lr %r4,%r2lr %r5,%r3sr %r2,%r2sr %r3,%r3sacf 5120: mvcle %r4,%r2,0jo 0b1: sacf 0br %r142: lr %r2,%r5lhi %r1,-4096slr %r5,%r1 # %r5 = %r4 + 4096nr %r5,%r1 # %r5 = (%r4 + 4096) & -4096slr %r5,%r4 # %r5 = #bytes to next user page boundaryclr %r2,%r5 # copy crosses next page boundary ?jnh 1b # no, the current page fauled# The page after the current user page might have faulted.# We cant't find out which page because the program check handler# might have callled schedule, destroying all lowcore information.# We retry with the shortened length.slr %r2,%r53: mvcle %r4,%r2,0jo 3bj 1b4: alr %r2,%r5j 1b.section __ex_table,"a".long 0b,2b.long 3b,4b.previous
