diff options
Diffstat (limited to 'arch/arm/mach-ep93xx/crunch-bits.S')
-rw-r--r-- | arch/arm/mach-ep93xx/crunch-bits.S | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/arch/arm/mach-ep93xx/crunch-bits.S b/arch/arm/mach-ep93xx/crunch-bits.S index 0ec9bb48fab9..e96923a3017b 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 | /* |
@@ -62,14 +63,16 @@ | |||
62 | * r9 = ret_from_exception | 63 | * r9 = ret_from_exception |
63 | * lr = undefined instr exit | 64 | * lr = undefined instr exit |
64 | * | 65 | * |
65 | * called from prefetch exception handler with interrupts disabled | 66 | * called from prefetch exception handler with interrupts enabled |
66 | */ | 67 | */ |
67 | ENTRY(crunch_task_enable) | 68 | ENTRY(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 | ||
147 | crunch_load: | 150 | crunch_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 | ||
196 | 1: | ||
197 | #ifdef CONFIG_PREEMPT_COUNT | ||
198 | get_thread_info r10 | ||
199 | #endif | ||
200 | 2: dec_preempt_count r10, r3 | ||
193 | mov pc, lr | 201 | mov pc, lr |
194 | 202 | ||
195 | /* | 203 | /* |