0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #include <asm/asm.h>
0014 #include <asm/cachectl.h>
0015 #include <asm/mipsregs.h>
0016 #include <asm/asm-offsets.h>
0017 #include <asm/regdef.h>
0018 #include <asm/stackframe.h>
0019 #include <asm/thread_info.h>
0020
0021 #include <asm/asmmacro.h>
0022
0023
0024
0025
0026
0027 .align 5
0028 LEAF(resume)
0029 mfc0 t1, CP0_STATUS
0030 LONG_S t1, THREAD_STATUS(a0)
0031 cpu_save_nonscratch a0
0032 LONG_S ra, THREAD_REG31(a0)
0033
0034 #if defined(CONFIG_STACKPROTECTOR) && !defined(CONFIG_SMP)
0035 PTR_LA t8, __stack_chk_guard
0036 LONG_L t9, TASK_STACK_CANARY(a1)
0037 LONG_S t9, 0(t8)
0038 #endif
0039
0040
0041
0042
0043
0044 move $28, a2
0045 cpu_restore_nonscratch a1
0046
0047 PTR_ADDU t0, $28, _THREAD_SIZE - 32
0048 set_saved_sp t0, t1, t2
0049 mfc0 t1, CP0_STATUS
0050 li a3, 0xff01
0051 and t1, a3
0052 LONG_L a2, THREAD_STATUS(a1)
0053 nor a3, $0, a3
0054 and a2, a3
0055 or a2, t1
0056 mtc0 a2, CP0_STATUS
0057 move v0, a0
0058 jr ra
0059 END(resume)