]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: Make use of the ERETNC instruction on MIPS R6
authorMarkos Chandras <markos.chandras@imgtec.com>
Wed, 3 Dec 2014 12:37:32 +0000 (12:37 +0000)
committerMarkos Chandras <markos.chandras@imgtec.com>
Tue, 17 Feb 2015 15:37:37 +0000 (15:37 +0000)
commit3ee9ca6e94d6808962bea7e4b67b52ffc2a30efb
tree362d5ffcf8fea7c26373750efb106ca1e41c275f
parent110b10a60f0d476e4658e278c33ea82bd14e5b3a
MIPS: Make use of the ERETNC instruction on MIPS R6

The ERETNC instruction, introduced in MIPS R5, is similar to the ERET
one, except it does not clear the LLB bit in the LLADDR register.
This feature is necessary to safely emulate R2 LL/SC instructions.
However, on context switches, we need to clear the LLAddr/LLB bit
in order to make sure that an SC instruction from the new thread
will never succeed if it happens to interrupt an LL operation on the
same address from the previous thread.

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
arch/mips/include/asm/switch_to.h
arch/mips/include/asm/thread_info.h
arch/mips/kernel/asm-offsets.c
arch/mips/kernel/entry.S
arch/mips/kernel/traps.c