aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ep93xx
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2014-04-22 11:14:28 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2014-04-25 07:06:37 -0400
commitbc94081c6ac823c4723d8e36e9604c6cf3eba0ef (patch)
tree66ce141e4fab1cb9fdc719e8c453e11e2666357d /arch/arm/mach-ep93xx
parent431a84b1a4f7d1a0085d5b91330c5053cc8e8b12 (diff)
ARM: 8035/1: Disable preemption in crunch_task_enable()
This patch is in preparation for calling the crunch_task_enable() function with interrupts enabled. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Cc: Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ryan Mallon <rmallon@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-ep93xx')
-rw-r--r--arch/arm/mach-ep93xx/crunch-bits.S12
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/arm/mach-ep93xx/crunch-bits.S b/arch/arm/mach-ep93xx/crunch-bits.S
index 0ec9bb48fab9..eaa5e34729d3 100644
--- a/arch/arm/mach-ep93xx/crunch-bits.S
+++ b/arch/arm/mach-ep93xx/crunch-bits.S
@@ -16,6 +16,7 @@
16#include <asm/ptrace.h> 16#include <asm/ptrace.h>
17#include <asm/thread_info.h> 17#include <asm/thread_info.h>
18#include <asm/asm-offsets.h> 18#include <asm/asm-offsets.h>
19#include <asm/assembler.h>
19#include <mach/ep93xx-regs.h> 20#include <mach/ep93xx-regs.h>
20 21
21/* 22/*
@@ -65,11 +66,13 @@
65 * called from prefetch exception handler with interrupts disabled 66 * called from prefetch exception handler with interrupts disabled
66 */ 67 */
67ENTRY(crunch_task_enable) 68ENTRY(crunch_task_enable)
69 inc_preempt_count r10, r3
70
68 ldr r8, =(EP93XX_APB_VIRT_BASE + 0x00130000) @ syscon addr 71 ldr r8, =(EP93XX_APB_VIRT_BASE + 0x00130000) @ syscon addr
69 72
70 ldr r1, [r8, #0x80] 73 ldr r1, [r8, #0x80]
71 tst r1, #0x00800000 @ access to crunch enabled? 74 tst r1, #0x00800000 @ access to crunch enabled?
72 movne pc, lr @ if so no business here 75 bne 2f @ if so no business here
73 mov r3, #0xaa @ unlock syscon swlock 76 mov r3, #0xaa @ unlock syscon swlock
74 str r3, [r8, #0xc0] 77 str r3, [r8, #0xc0]
75 orr r1, r1, #0x00800000 @ enable access to crunch 78 orr r1, r1, #0x00800000 @ enable access to crunch
@@ -142,7 +145,7 @@ crunch_save:
142 145
143 teq r0, #0 @ anything to load? 146 teq r0, #0 @ anything to load?
144 cfldr64eq mvdx0, [r1, #CRUNCH_MVDX0] @ mvdx0 was clobbered 147 cfldr64eq mvdx0, [r1, #CRUNCH_MVDX0] @ mvdx0 was clobbered
145 moveq pc, lr 148 beq 1f
146 149
147crunch_load: 150crunch_load:
148 cfldr64 mvdx0, [r0, #CRUNCH_DSPSC] @ load status word 151 cfldr64 mvdx0, [r0, #CRUNCH_DSPSC] @ load status word
@@ -190,6 +193,11 @@ crunch_load:
190 cfldr64 mvdx14, [r0, #CRUNCH_MVDX14] 193 cfldr64 mvdx14, [r0, #CRUNCH_MVDX14]
191 cfldr64 mvdx15, [r0, #CRUNCH_MVDX15] 194 cfldr64 mvdx15, [r0, #CRUNCH_MVDX15]
192 195
1961:
197#ifdef CONFIG_PREEMPT_COUNT
198 get_thread_info r10
199#endif
2002: dec_preempt_count r10, r3
193 mov pc, lr 201 mov pc, lr
194 202
195/* 203/*