提交 431a84b1 编写于 作者: C Catalin Marinas 提交者: Russell King

ARM: 8034/1: Disable preemption in iwmmxt_task_enable()

This patch is in preparation for calling the iwmmxt_task_enable()
function with interrupts enabled.
Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 a05e54c1
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include <asm/ptrace.h> #include <asm/ptrace.h>
#include <asm/thread_info.h> #include <asm/thread_info.h>
#include <asm/asm-offsets.h> #include <asm/asm-offsets.h>
#include <asm/assembler.h>
#if defined(CONFIG_CPU_PJ4) #if defined(CONFIG_CPU_PJ4)
#define PJ4(code...) code #define PJ4(code...) code
...@@ -65,13 +66,14 @@ ...@@ -65,13 +66,14 @@
*/ */
ENTRY(iwmmxt_task_enable) ENTRY(iwmmxt_task_enable)
inc_preempt_count r10, r3
XSC(mrc p15, 0, r2, c15, c1, 0) XSC(mrc p15, 0, r2, c15, c1, 0)
PJ4(mrc p15, 0, r2, c1, c0, 2) PJ4(mrc p15, 0, r2, c1, c0, 2)
@ CP0 and CP1 accessible? @ CP0 and CP1 accessible?
XSC(tst r2, #0x3) XSC(tst r2, #0x3)
PJ4(tst r2, #0xf) PJ4(tst r2, #0xf)
movne pc, lr @ if so no business here bne 4f @ if so no business here
@ enable access to CP0 and CP1 @ enable access to CP0 and CP1
XSC(orr r2, r2, #0x3) XSC(orr r2, r2, #0x3)
XSC(mcr p15, 0, r2, c15, c1, 0) XSC(mcr p15, 0, r2, c15, c1, 0)
...@@ -132,7 +134,7 @@ concan_dump: ...@@ -132,7 +134,7 @@ concan_dump:
wstrd wR15, [r1, #MMX_WR15] wstrd wR15, [r1, #MMX_WR15]
2: teq r0, #0 @ anything to load? 2: teq r0, #0 @ anything to load?
moveq pc, lr beq 3f
concan_load: concan_load:
...@@ -165,8 +167,14 @@ concan_load: ...@@ -165,8 +167,14 @@ concan_load:
@ clear CUP/MUP (only if r1 != 0) @ clear CUP/MUP (only if r1 != 0)
teq r1, #0 teq r1, #0
mov r2, #0 mov r2, #0
moveq pc, lr beq 3f
tmcr wCon, r2 tmcr wCon, r2
3:
#ifdef CONFIG_PREEMPT_COUNT
get_thread_info r10
#endif
4: dec_preempt_count r10, r3
mov pc, lr mov pc, lr
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册