.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
---|
1 | 2 | /* |
---|
2 | 3 | * Based on arch/arm/lib/clear_user.S |
---|
3 | 4 | * |
---|
4 | 5 | * 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/>. |
---|
17 | 6 | */ |
---|
18 | 7 | #include <linux/linkage.h> |
---|
19 | 8 | |
---|
20 | 9 | #include <asm/asm-uaccess.h> |
---|
| 10 | +#include <asm/assembler.h> |
---|
21 | 11 | |
---|
22 | 12 | .text |
---|
23 | 13 | |
---|
.. | .. |
---|
29 | 19 | * |
---|
30 | 20 | * Alignment fixed up by hardware. |
---|
31 | 21 | */ |
---|
32 | | -ENTRY(__arch_clear_user) |
---|
33 | | - uaccess_enable_not_uao x2, x3, x4 |
---|
| 22 | +SYM_FUNC_START(__arch_clear_user) |
---|
34 | 23 | mov x2, x1 // save the size for fixup return |
---|
35 | 24 | subs x1, x1, #8 |
---|
36 | 25 | b.mi 2f |
---|
.. | .. |
---|
50 | 39 | b.mi 5f |
---|
51 | 40 | uao_user_alternative 9f, strb, sttrb, wzr, x0, 0 |
---|
52 | 41 | 5: mov x0, #0 |
---|
53 | | - uaccess_disable_not_uao x2, x3 |
---|
54 | 42 | ret |
---|
55 | | -ENDPROC(__arch_clear_user) |
---|
| 43 | +SYM_FUNC_END(__arch_clear_user) |
---|
| 44 | +EXPORT_SYMBOL(__arch_clear_user) |
---|
56 | 45 | |
---|
57 | 46 | .section .fixup,"ax" |
---|
58 | 47 | .align 2 |
---|
59 | 48 | 9: mov x0, x2 // return the original size |
---|
60 | | - uaccess_disable_not_uao x2, x3 |
---|
61 | 49 | ret |
---|
62 | 50 | .previous |
---|