forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-06 08f87f769b595151be1afeff53e144f543faa614
kernel/arch/x86/mm/mem_encrypt_boot.S
....@@ -1,17 +1,14 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * AMD Memory Encryption Support
34 *
45 * Copyright (C) 2016 Advanced Micro Devices, Inc.
56 *
67 * Author: Tom Lendacky <thomas.lendacky@amd.com>
7
- *
8
- * This program is free software; you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License version 2 as
10
- * published by the Free Software Foundation.
118 */
129
1310 #include <linux/linkage.h>
14
-#include <asm/pgtable.h>
11
+#include <linux/pgtable.h>
1512 #include <asm/page.h>
1613 #include <asm/processor-flags.h>
1714 #include <asm/msr-index.h>
....@@ -19,7 +16,7 @@
1916
2017 .text
2118 .code64
22
-ENTRY(sme_encrypt_execute)
19
+SYM_FUNC_START(sme_encrypt_execute)
2320
2421 /*
2522 * Entry parameters:
....@@ -68,10 +65,13 @@
6865 movq %rbp, %rsp /* Restore original stack pointer */
6966 pop %rbp
7067
68
+ /* Offset to __x86_return_thunk would be wrong here */
69
+ ANNOTATE_UNRET_SAFE
7170 ret
72
-ENDPROC(sme_encrypt_execute)
71
+ int3
72
+SYM_FUNC_END(sme_encrypt_execute)
7373
74
-ENTRY(__enc_copy)
74
+SYM_FUNC_START(__enc_copy)
7575 /*
7676 * Routine used to encrypt memory in place.
7777 * This routine must be run outside of the kernel proper since
....@@ -154,6 +154,9 @@
154154 pop %r12
155155 pop %r15
156156
157
+ /* Offset to __x86_return_thunk would be wrong here */
158
+ ANNOTATE_UNRET_SAFE
157159 ret
160
+ int3
158161 .L__enc_copy_end:
159
-ENDPROC(__enc_copy)
162
+SYM_FUNC_END(__enc_copy)