hc
2024-10-12 a5969cabbb4660eab42b6ef0412cbbd1200cf14d
kernel/arch/arm64/lib/clear_user.S
....@@ -1,23 +1,13 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Based on arch/arm/lib/clear_user.S
34 *
45 * Copyright (C) 2012 ARM Ltd.
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License version 2 as
8
- * published by the Free Software Foundation.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
176 */
187 #include <linux/linkage.h>
198
209 #include <asm/asm-uaccess.h>
10
+#include <asm/assembler.h>
2111
2212 .text
2313
....@@ -29,8 +19,7 @@
2919 *
3020 * Alignment fixed up by hardware.
3121 */
32
-ENTRY(__arch_clear_user)
33
- uaccess_enable_not_uao x2, x3, x4
22
+SYM_FUNC_START(__arch_clear_user)
3423 mov x2, x1 // save the size for fixup return
3524 subs x1, x1, #8
3625 b.mi 2f
....@@ -50,13 +39,12 @@
5039 b.mi 5f
5140 uao_user_alternative 9f, strb, sttrb, wzr, x0, 0
5241 5: mov x0, #0
53
- uaccess_disable_not_uao x2, x3
5442 ret
55
-ENDPROC(__arch_clear_user)
43
+SYM_FUNC_END(__arch_clear_user)
44
+EXPORT_SYMBOL(__arch_clear_user)
5645
5746 .section .fixup,"ax"
5847 .align 2
5948 9: mov x0, x2 // return the original size
60
- uaccess_disable_not_uao x2, x3
6149 ret
6250 .previous