Revert "FROMLIST: arm64: preserve x18 when CPU is suspended"
Shadow call stack is now merged upstream for 5.9, so revert the patches
cherry-picked into android-mainline in preparation for pulling the upstream
version instead.
This reverts commit ee3f10f584.
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: Ie68af0533b0d25d8aa925ef365c897941d0dd21b
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
#ifndef __ASM_SUSPEND_H
|
#ifndef __ASM_SUSPEND_H
|
||||||
#define __ASM_SUSPEND_H
|
#define __ASM_SUSPEND_H
|
||||||
|
|
||||||
#define NR_CTX_REGS 13
|
#define NR_CTX_REGS 12
|
||||||
#define NR_CALLEE_SAVED_REGS 12
|
#define NR_CALLEE_SAVED_REGS 12
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -58,8 +58,6 @@
|
|||||||
* cpu_do_suspend - save CPU registers context
|
* cpu_do_suspend - save CPU registers context
|
||||||
*
|
*
|
||||||
* x0: virtual address of context pointer
|
* x0: virtual address of context pointer
|
||||||
*
|
|
||||||
* This must be kept in sync with struct cpu_suspend_ctx in <asm/suspend.h>.
|
|
||||||
*/
|
*/
|
||||||
SYM_FUNC_START(cpu_do_suspend)
|
SYM_FUNC_START(cpu_do_suspend)
|
||||||
mrs x2, tpidr_el0
|
mrs x2, tpidr_el0
|
||||||
@@ -84,11 +82,6 @@ alternative_endif
|
|||||||
stp x8, x9, [x0, #48]
|
stp x8, x9, [x0, #48]
|
||||||
stp x10, x11, [x0, #64]
|
stp x10, x11, [x0, #64]
|
||||||
stp x12, x13, [x0, #80]
|
stp x12, x13, [x0, #80]
|
||||||
/*
|
|
||||||
* Save x18 as it may be used as a platform register, e.g. by shadow
|
|
||||||
* call stack.
|
|
||||||
*/
|
|
||||||
str x18, [x0, #96]
|
|
||||||
ret
|
ret
|
||||||
SYM_FUNC_END(cpu_do_suspend)
|
SYM_FUNC_END(cpu_do_suspend)
|
||||||
|
|
||||||
@@ -105,13 +98,6 @@ SYM_FUNC_START(cpu_do_resume)
|
|||||||
ldp x9, x10, [x0, #48]
|
ldp x9, x10, [x0, #48]
|
||||||
ldp x11, x12, [x0, #64]
|
ldp x11, x12, [x0, #64]
|
||||||
ldp x13, x14, [x0, #80]
|
ldp x13, x14, [x0, #80]
|
||||||
/*
|
|
||||||
* Restore x18, as it may be used as a platform register, and clear
|
|
||||||
* the buffer to minimize the risk of exposure when used for shadow
|
|
||||||
* call stack.
|
|
||||||
*/
|
|
||||||
ldr x18, [x0, #96]
|
|
||||||
str xzr, [x0, #96]
|
|
||||||
msr tpidr_el0, x2
|
msr tpidr_el0, x2
|
||||||
msr tpidrro_el0, x3
|
msr tpidrro_el0, x3
|
||||||
msr contextidr_el1, x4
|
msr contextidr_el1, x4
|
||||||
|
|||||||
Reference in New Issue
Block a user