| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * AMD Memory Encryption Support |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (C) 2016 Advanced Micro Devices, Inc. |
|---|
| 5 | 6 | * |
|---|
| 6 | 7 | * 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. |
|---|
| 11 | 8 | */ |
|---|
| 12 | 9 | |
|---|
| 13 | 10 | #include <linux/linkage.h> |
|---|
| 14 | | -#include <asm/pgtable.h> |
|---|
| 11 | +#include <linux/pgtable.h> |
|---|
| 15 | 12 | #include <asm/page.h> |
|---|
| 16 | 13 | #include <asm/processor-flags.h> |
|---|
| 17 | 14 | #include <asm/msr-index.h> |
|---|
| .. | .. |
|---|
| 19 | 16 | |
|---|
| 20 | 17 | .text |
|---|
| 21 | 18 | .code64 |
|---|
| 22 | | -ENTRY(sme_encrypt_execute) |
|---|
| 19 | +SYM_FUNC_START(sme_encrypt_execute) |
|---|
| 23 | 20 | |
|---|
| 24 | 21 | /* |
|---|
| 25 | 22 | * Entry parameters: |
|---|
| .. | .. |
|---|
| 68 | 65 | movq %rbp, %rsp /* Restore original stack pointer */ |
|---|
| 69 | 66 | pop %rbp |
|---|
| 70 | 67 | |
|---|
| 68 | + /* Offset to __x86_return_thunk would be wrong here */ |
|---|
| 69 | + ANNOTATE_UNRET_SAFE |
|---|
| 71 | 70 | ret |
|---|
| 72 | | -ENDPROC(sme_encrypt_execute) |
|---|
| 71 | + int3 |
|---|
| 72 | +SYM_FUNC_END(sme_encrypt_execute) |
|---|
| 73 | 73 | |
|---|
| 74 | | -ENTRY(__enc_copy) |
|---|
| 74 | +SYM_FUNC_START(__enc_copy) |
|---|
| 75 | 75 | /* |
|---|
| 76 | 76 | * Routine used to encrypt memory in place. |
|---|
| 77 | 77 | * This routine must be run outside of the kernel proper since |
|---|
| .. | .. |
|---|
| 154 | 154 | pop %r12 |
|---|
| 155 | 155 | pop %r15 |
|---|
| 156 | 156 | |
|---|
| 157 | + /* Offset to __x86_return_thunk would be wrong here */ |
|---|
| 158 | + ANNOTATE_UNRET_SAFE |
|---|
| 157 | 159 | ret |
|---|
| 160 | + int3 |
|---|
| 158 | 161 | .L__enc_copy_end: |
|---|
| 159 | | -ENDPROC(__enc_copy) |
|---|
| 162 | +SYM_FUNC_END(__enc_copy) |
|---|