| * Copy to/from userspace with optional address space checking. |
| * Copyright 2004-2006 Atmel Corporation |
| * This program is free software; you can redistribute it and/or modify |
| * it under the terms of the GNU General Public License version 2 as |
| * published by the Free Software Foundation. |
| #include <asm/thread_info.h> |
| #include <asm/processor.h> |
| .type strnlen_user, "function" |
| branch_if_kernel r8, __strnlen_user |
| brmi adjust_length /* do a closer inspection */ |
| .type __strnlen_user, "function" |
| .type adjust_length, "function" |
| cp.w r12, 0 /* addr must always be < TASK_SIZE */ |