x86/mm: Clean up register saving in the __enc_copy() assembly code
authorTom Lendacky <thomas.lendacky@amd.com>
Wed, 10 Jan 2018 19:25:56 +0000 (13:25 -0600)
committerIngo Molnar <mingo@kernel.org>
Tue, 16 Jan 2018 00:50:58 +0000 (01:50 +0100)
commit1303880179e67c59e801429b7e5d0f6b21137d99
tree5102d68b981799f01f378691984fc8a3d2522111
parent327867faa4d66628fcd92a843adb3345736a5313
x86/mm: Clean up register saving in the __enc_copy() assembly code

Clean up the use of PUSH and POP and when registers are saved in the
__enc_copy() assembly function in order to improve the readability of the code.

Move parameter register saving into general purpose registers earlier
in the code and move all the pushes to the beginning of the function
with corresponding pops at the end.

We do this to prepare fixes.

Tested-by: Gabriel Craciunescu <nix.or.die@gmail.com>
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Reviewed-by: Borislav Petkov <bp@suse.de>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brijesh Singh <brijesh.singh@amd.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20180110192556.6026.74187.stgit@tlendack-t1.amdoffice.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/mm/mem_encrypt_boot.S