arm64: kernel: Rework finisher callback out of __cpu_suspend_enter()
Hibernate could make use of the cpu_suspend() code to save/restore cpu state, however it needs to be able to return '0' from the 'finisher'. Rework cpu_suspend() so that the finisher is called from C code, independently from the save/restore of cpu state. Space to save the context in is allocated in the caller's stack frame, and passed into __cpu_suspend_enter(). Hibernate's use of this API will look like a copy of the cpu_suspend() function. Signed-off-by:James Morse <james.morse@arm.com> Acked-by:
Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Reviewed-by:
Catalin Marinas <catalin.marinas@arm.com> Signed-off-by:
Will Deacon <will.deacon@arm.com>
Showing
- arch/arm64/include/asm/suspend.h 20 additions, 0 deletionsarch/arm64/include/asm/suspend.h
- arch/arm64/kernel/asm-offsets.c 2 additions, 0 deletionsarch/arm64/kernel/asm-offsets.c
- arch/arm64/kernel/sleep.S 33 additions, 60 deletionsarch/arm64/kernel/sleep.S
- arch/arm64/kernel/suspend.c 42 additions, 30 deletionsarch/arm64/kernel/suspend.c
Please register or sign in to comment