aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/include/asm/stackframe.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/include/asm/stackframe.h')
-rw-r--r--arch/mips/include/asm/stackframe.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/mips/include/asm/stackframe.h b/arch/mips/include/asm/stackframe.h
index 4c37c4e5f72e..db0fa7b5aeaf 100644
--- a/arch/mips/include/asm/stackframe.h
+++ b/arch/mips/include/asm/stackframe.h
@@ -194,6 +194,19 @@
194 LONG_S $31, PT_R31(sp) 194 LONG_S $31, PT_R31(sp)
195 ori $28, sp, _THREAD_MASK 195 ori $28, sp, _THREAD_MASK
196 xori $28, _THREAD_MASK 196 xori $28, _THREAD_MASK
197#ifdef CONFIG_CPU_CAVIUM_OCTEON
198 .set mips64
199 pref 0, 0($28) /* Prefetch the current pointer */
200 pref 0, PT_R31(sp) /* Prefetch the $31(ra) */
201 /* The Octeon multiplier state is affected by general multiply
202 instructions. It must be saved before and kernel code might
203 corrupt it */
204 jal octeon_mult_save
205 LONG_L v1, 0($28) /* Load the current pointer */
206 /* Restore $31(ra) that was changed by the jal */
207 LONG_L ra, PT_R31(sp)
208 pref 0, 0(v1) /* Prefetch the current thread */
209#endif
197 .set pop 210 .set pop
198 .endm 211 .endm
199 212
@@ -324,6 +337,10 @@
324 DVPE 5 # dvpe a1 337 DVPE 5 # dvpe a1
325 jal mips_ihb 338 jal mips_ihb
326#endif /* CONFIG_MIPS_MT_SMTC */ 339#endif /* CONFIG_MIPS_MT_SMTC */
340#ifdef CONFIG_CPU_CAVIUM_OCTEON
341 /* Restore the Octeon multiplier state */
342 jal octeon_mult_restore
343#endif
327 mfc0 a0, CP0_STATUS 344 mfc0 a0, CP0_STATUS
328 ori a0, STATMASK 345 ori a0, STATMASK
329 xori a0, STATMASK 346 xori a0, STATMASK