aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/iwmmxt.S
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2014-04-22 11:14:27 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2014-04-25 07:06:37 -0400
commit431a84b1a4f7d1a0085d5b91330c5053cc8e8b12 (patch)
treec4291aef9feb162eefe9cad19b290231f0c4d6f9 /arch/arm/kernel/iwmmxt.S
parenta05e54c103b0b8e1dab5d04b411f1d48387c4903 (diff)
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: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/iwmmxt.S')
-rw-r--r--arch/arm/kernel/iwmmxt.S14
1 files changed, 11 insertions, 3 deletions
diff --git a/arch/arm/kernel/iwmmxt.S b/arch/arm/kernel/iwmmxt.S
index a08783823b32..fcb33a70a35f 100644
--- a/arch/arm/kernel/iwmmxt.S
+++ b/arch/arm/kernel/iwmmxt.S
@@ -18,6 +18,7 @@
18#include <asm/ptrace.h> 18#include <asm/ptrace.h>
19#include <asm/thread_info.h> 19#include <asm/thread_info.h>
20#include <asm/asm-offsets.h> 20#include <asm/asm-offsets.h>
21#include <asm/assembler.h>
21 22
22#if defined(CONFIG_CPU_PJ4) 23#if defined(CONFIG_CPU_PJ4)
23#define PJ4(code...) code 24#define PJ4(code...) code
@@ -65,13 +66,14 @@
65 */ 66 */
66 67
67ENTRY(iwmmxt_task_enable) 68ENTRY(iwmmxt_task_enable)
69 inc_preempt_count r10, r3
68 70
69 XSC(mrc p15, 0, r2, c15, c1, 0) 71 XSC(mrc p15, 0, r2, c15, c1, 0)
70 PJ4(mrc p15, 0, r2, c1, c0, 2) 72 PJ4(mrc p15, 0, r2, c1, c0, 2)
71 @ CP0 and CP1 accessible? 73 @ CP0 and CP1 accessible?
72 XSC(tst r2, #0x3) 74 XSC(tst r2, #0x3)
73 PJ4(tst r2, #0xf) 75 PJ4(tst r2, #0xf)
74 movne pc, lr @ if so no business here 76 bne 4f @ if so no business here
75 @ enable access to CP0 and CP1 77 @ enable access to CP0 and CP1
76 XSC(orr r2, r2, #0x3) 78 XSC(orr r2, r2, #0x3)
77 XSC(mcr p15, 0, r2, c15, c1, 0) 79 XSC(mcr p15, 0, r2, c15, c1, 0)
@@ -132,7 +134,7 @@ concan_dump:
132 wstrd wR15, [r1, #MMX_WR15] 134 wstrd wR15, [r1, #MMX_WR15]
133 135
1342: teq r0, #0 @ anything to load? 1362: teq r0, #0 @ anything to load?
135 moveq pc, lr 137 beq 3f
136 138
137concan_load: 139concan_load:
138 140
@@ -165,8 +167,14 @@ concan_load:
165 @ clear CUP/MUP (only if r1 != 0) 167 @ clear CUP/MUP (only if r1 != 0)
166 teq r1, #0 168 teq r1, #0
167 mov r2, #0 169 mov r2, #0
168 moveq pc, lr 170 beq 3f
169 tmcr wCon, r2 171 tmcr wCon, r2
172
1733:
174#ifdef CONFIG_PREEMPT_COUNT
175 get_thread_info r10
176#endif
1774: dec_preempt_count r10, r3
170 mov pc, lr 178 mov pc, lr
171 179
172/* 180/*