sleep.S (a1c510d0adc604bb143c86052bc5be48cbcfa17c) | sleep.S (7b9896c352073156a325c3bb0dc4c46e06e2a468) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0 */ 2#include <linux/linkage.h> 3#include <linux/threads.h> 4#include <asm/asm-offsets.h> 5#include <asm/assembler.h> 6#include <asm/glue-cache.h> 7#include <asm/glue-proc.h> 8 .text --- 57 unchanged lines hidden (view full) --- 66#else 67 ldr r4, =cpu_suspend_size 68#endif 69 mov r5, sp @ current virtual SP 70#ifdef CONFIG_VMAP_STACK 71 @ Run the suspend code from the overflow stack so we don't have to rely 72 @ on vmalloc-to-phys conversions anywhere in the arch suspend code. 73 @ The original SP value captured in R5 will be restored on the way out. | 1/* SPDX-License-Identifier: GPL-2.0 */ 2#include <linux/linkage.h> 3#include <linux/threads.h> 4#include <asm/asm-offsets.h> 5#include <asm/assembler.h> 6#include <asm/glue-cache.h> 7#include <asm/glue-proc.h> 8 .text --- 57 unchanged lines hidden (view full) --- 66#else 67 ldr r4, =cpu_suspend_size 68#endif 69 mov r5, sp @ current virtual SP 70#ifdef CONFIG_VMAP_STACK 71 @ Run the suspend code from the overflow stack so we don't have to rely 72 @ on vmalloc-to-phys conversions anywhere in the arch suspend code. 73 @ The original SP value captured in R5 will be restored on the way out. |
74 mov_l r6, overflow_stack_ptr @ Base pointer 75 mrc p15, 0, r7, c13, c0, 4 @ Get per-CPU offset 76 ldr sp, [r6, r7] @ Address of this CPU's overflow stack | 74 ldr_this_cpu sp, overflow_stack_ptr, r6, r7 |
77#endif 78 add r4, r4, #12 @ Space for pgd, virt sp, phys resume fn 79 sub sp, sp, r4 @ allocate CPU state on stack 80 ldr r3, =sleep_save_sp 81 stmfd sp!, {r0, r1} @ save suspend func arg and pointer 82 ldr r3, [r3, #SLEEP_SAVE_SP_VIRT] 83 ALT_SMP(W(nop)) @ don't use adr_l inside ALT_SMP() 84 ALT_UP_B(1f) --- 105 unchanged lines hidden --- | 75#endif 76 add r4, r4, #12 @ Space for pgd, virt sp, phys resume fn 77 sub sp, sp, r4 @ allocate CPU state on stack 78 ldr r3, =sleep_save_sp 79 stmfd sp!, {r0, r1} @ save suspend func arg and pointer 80 ldr r3, [r3, #SLEEP_SAVE_SP_VIRT] 81 ALT_SMP(W(nop)) @ don't use adr_l inside ALT_SMP() 82 ALT_UP_B(1f) --- 105 unchanged lines hidden --- |