summaryrefslogtreecommitdiff
path: root/arch/xtensa/lib/strnlen_user.S
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2017-12-09 21:22:37 -0800
committerMax Filippov <jcmvbkbc@gmail.com>2017-12-10 14:48:54 -0800
commit5cf97ebd8b40e2b1791136fc1476d17365864b18 (patch)
tree28f7123d675169d6e360832b9c1e879845219162 /arch/xtensa/lib/strnlen_user.S
parentfbb871e220672a8e9e4e7870da5b206fe05904b2 (diff)
xtensa: clean up functions in assembly code
Use ENTRY and ENDPROC throughout arch/xtensa/lib assembly sources. Introduce asm/linkage.h and define xtensa-specific __ALIGN macro there. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'arch/xtensa/lib/strnlen_user.S')
-rw-r--r--arch/xtensa/lib/strnlen_user.S9
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/xtensa/lib/strnlen_user.S b/arch/xtensa/lib/strnlen_user.S
index 9404ac46ce4c..0b956ce7f386 100644
--- a/arch/xtensa/lib/strnlen_user.S
+++ b/arch/xtensa/lib/strnlen_user.S
@@ -11,6 +11,7 @@
* Copyright (C) 2002 Tensilica Inc.
*/
+#include <linux/linkage.h>
#include <variant/core.h>
#include <asm/asmmacro.h>
@@ -42,10 +43,8 @@
# a10/ tmp
.text
-.align 4
-.global __strnlen_user
-.type __strnlen_user,@function
-__strnlen_user:
+ENTRY(__strnlen_user)
+
entry sp, 16 # minimal stack frame
# a2/ s, a3/ len
addi a4, a2, -4 # because we overincrement at the end;
@@ -133,6 +132,8 @@ EX(10f) l32i a9, a4, 0 # get word with first two bytes of string
sub a2, a4, a2 # subtract to get length
retw
+ENDPROC(__strnlen_user)
+
.section .fixup, "ax"
.align 4
10: