1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * linux/arch/unicore32/lib/strnlen_user.S
5 * Code specific to PKUnity SoC and UniCore ISA
7 * Copyright (C) 2001-2010 GUAN Xue-tao
9 #include <linux/linkage.h>
10 #include <asm/assembler.h>
11 #include <asm/errno.h>
16 /* Prototype: unsigned long __strnlen_user(const char *str, long n)
17 * Purpose : get length of a string in user memory
18 * Params : str - address of string in user memory
19 * Returns : length of string *including terminator*
20 * or zero on exception, or n + 1 if too long
33 ENDPROC(__strnlen_user)
35 .pushsection .fixup,"ax"