1: adr r0, __v7_setup_stack_ptr
ldr r12, [r0]
add r12, r12, r0 @ the local stack
+1:
stmia r12, {r1-r6, lr} @ v7_invalidate_l1 touches r0-r6
+ ldr r0, [r12, #(6 * 4)] @ read back the return address
+ teq r0, lr @ confirm it is correct
+ bne 1b @ retrying if not
bl v7_invalidate_l1
ldmia r12, {r1-r6, lr}
#ifdef CONFIG_SMP
adr r0, __v7_setup_stack_ptr
ldr r12, [r0]
add r12, r12, r0 @ the local stack
+1:
stmia r12, {r1-r6, lr} @ v7_invalidate_l1 touches r0-r6
+ ldr r0, [r12, #(6 * 4)] @ read back the return address
+ teq r0, lr @ confirm it is correct
+ bne 1b @ retrying if not
bl v7_invalidate_l1
ldmia r12, {r1-r6, lr}