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