Index: kernel/arch/mips32/include/arch/context_struct.h
===================================================================
--- kernel/arch/mips32/include/arch/context_struct.h	(revision ed88c8e9e48e792fdd0df46568e33e36eb624db3)
+++ kernel/arch/mips32/include/arch/context_struct.h	(revision 58093d99e8de3e461cadfcbc02a56288a1c5a2d6)
@@ -42,6 +42,7 @@
 #define CONTEXT_OFFSET_S8  0x28
 #define CONTEXT_OFFSET_GP  0x2c
-#define CONTEXT_OFFSET_IPL 0x30
-#define CONTEXT_SIZE       0x34
+#define CONTEXT_OFFSET_TP  0x30
+#define CONTEXT_OFFSET_IPL 0x34
+#define CONTEXT_SIZE       0x38
 
 #ifndef __ASSEMBLER__
@@ -63,4 +64,6 @@
 	uint32_t s8;
 	uint32_t gp;
+	/* We use the K1 register for userspace thread pointer. */
+	uint32_t tp;
 	ipl_t ipl;
 } context_t;
Index: kernel/arch/mips32/src/context.S
===================================================================
--- kernel/arch/mips32/src/context.S	(revision ed88c8e9e48e792fdd0df46568e33e36eb624db3)
+++ kernel/arch/mips32/src/context.S	(revision 58093d99e8de3e461cadfcbc02a56288a1c5a2d6)
@@ -47,4 +47,5 @@
 	sw $s8, CONTEXT_OFFSET_S8($a0)
 	sw $gp, CONTEXT_OFFSET_GP($a0)
+	sw $k1, CONTEXT_OFFSET_TP($a0)
 
 	sw $ra, CONTEXT_OFFSET_PC($a0)
@@ -67,4 +68,5 @@
 	lw $s8, CONTEXT_OFFSET_S8($a0)
 	lw $gp, CONTEXT_OFFSET_GP($a0)
+	lw $k1, CONTEXT_OFFSET_TP($a0)
 
 	lw $ra, CONTEXT_OFFSET_PC($a0)
Index: kernel/arch/mips32/src/start.S
===================================================================
--- kernel/arch/mips32/src/start.S	(revision ed88c8e9e48e792fdd0df46568e33e36eb624db3)
+++ kernel/arch/mips32/src/start.S	(revision 58093d99e8de3e461cadfcbc02a56288a1c5a2d6)
@@ -264,5 +264,4 @@
 	mfc0 $t2, $status
 	sw $t3, ISTATE_OFFSET_EPC($sp)  /* save EPC */
-	sw $k1, ISTATE_OFFSET_KT1($sp)  /* save $k1 not saved on context switch */
 
 	and $t4, $t2, REG_SAVE_MASK  /* save only KSU, EXL, ERL, IE */
@@ -300,5 +299,4 @@
 	/* restore epc + 4 */
 	lw $t2, ISTATE_OFFSET_EPC($sp)
-	lw $k1, ISTATE_OFFSET_KT1($sp)
 	addi $t2, $t2, 4
 	mtc0 $t2, $epc
