| * This file is subject to the terms and conditions of the GNU General Public |
| * License. See the file "COPYING" in the main directory of this archive |
| * Copyright (c) 1996, 1999 by Ralf Baechle |
| #include <asm/asm-offsets.h> |
| #define EX(insn,reg,addr,handler) \ |
| .section __ex_table,"a"; \ |
| * Returns: -EFAULT if exception before terminator, N if the entire |
| * buffer filled, else strlen. |
| * Ugly special case have to check: we might get passed a user space |
| * pointer which wraps into the kernel space. We don't deal with that. If |
| * it happens at most some bytes of the exceptions handlers will be copied. |
| LEAF(__strncpy_from_user_asm) |
| LONG_L v0, TI_ADDR_LIMIT($28) # pointer ok? |
| FEXPORT(__strncpy_from_user_nocheck_asm) |
| 1: EX(lbu, t0, (v1), .Lfault) |
| END(__strncpy_from_user_asm) |