Skip to content

Commit 431a84b

Browse files
ctmarinasRussell King
authored andcommitted
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>
1 parent a05e54c commit 431a84b

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

arch/arm/kernel/iwmmxt.S

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include <asm/ptrace.h>
1919
#include <asm/thread_info.h>
2020
#include <asm/asm-offsets.h>
21+
#include <asm/assembler.h>
2122

2223
#if defined(CONFIG_CPU_PJ4)
2324
#define PJ4(code...) code
@@ -65,13 +66,14 @@
6566
*/
6667

6768
ENTRY(iwmmxt_task_enable)
69+
inc_preempt_count r10, r3
6870

6971
XSC(mrc p15, 0, r2, c15, c1, 0)
7072
PJ4(mrc p15, 0, r2, c1, c0, 2)
7173
@ CP0 and CP1 accessible?
7274
XSC(tst r2, #0x3)
7375
PJ4(tst r2, #0xf)
74-
movne pc, lr @ if so no business here
76+
bne 4f @ if so no business here
7577
@ enable access to CP0 and CP1
7678
XSC(orr r2, r2, #0x3)
7779
XSC(mcr p15, 0, r2, c15, c1, 0)
@@ -132,7 +134,7 @@ concan_dump:
132134
wstrd wR15, [r1, #MMX_WR15]
133135

134136
2: teq r0, #0 @ anything to load?
135-
moveq pc, lr
137+
beq 3f
136138

137139
concan_load:
138140

@@ -165,8 +167,14 @@ concan_load:
165167
@ clear CUP/MUP (only if r1 != 0)
166168
teq r1, #0
167169
mov r2, #0
168-
moveq pc, lr
170+
beq 3f
169171
tmcr wCon, r2
172+
173+
3:
174+
#ifdef CONFIG_PREEMPT_COUNT
175+
get_thread_info r10
176+
#endif
177+
4: dec_preempt_count r10, r3
170178
mov pc, lr
171179

172180
/*

0 commit comments

Comments
 (0)