|
18 | 18 | #include <asm/ptrace.h>
|
19 | 19 | #include <asm/thread_info.h>
|
20 | 20 | #include <asm/asm-offsets.h>
|
| 21 | +#include <asm/assembler.h> |
21 | 22 |
|
22 | 23 | #if defined(CONFIG_CPU_PJ4)
|
23 | 24 | #define PJ4(code...) code
|
|
65 | 66 | */
|
66 | 67 |
|
67 | 68 | ENTRY(iwmmxt_task_enable)
|
| 69 | + inc_preempt_count r10, r3 |
68 | 70 |
|
69 | 71 | XSC(mrc p15, 0, r2, c15, c1, 0)
|
70 | 72 | PJ4(mrc p15, 0, r2, c1, c0, 2)
|
71 | 73 | @ CP0 and CP1 accessible?
|
72 | 74 | XSC(tst r2, #0x3)
|
73 | 75 | PJ4(tst r2, #0xf)
|
74 |
| - movne pc, lr @ if so no business here |
| 76 | + bne 4f @ if so no business here |
75 | 77 | @ enable access to CP0 and CP1
|
76 | 78 | XSC(orr r2, r2, #0x3)
|
77 | 79 | XSC(mcr p15, 0, r2, c15, c1, 0)
|
@@ -132,7 +134,7 @@ concan_dump:
|
132 | 134 | wstrd wR15, [r1, #MMX_WR15]
|
133 | 135 |
|
134 | 136 | 2: teq r0, #0 @ anything to load?
|
135 |
| - moveq pc, lr |
| 137 | + beq 3f |
136 | 138 |
|
137 | 139 | concan_load:
|
138 | 140 |
|
@@ -165,8 +167,14 @@ concan_load:
|
165 | 167 | @ clear CUP/MUP (only if r1 != 0)
|
166 | 168 | teq r1, #0
|
167 | 169 | mov r2, #0
|
168 |
| - moveq pc, lr |
| 170 | + beq 3f |
169 | 171 | 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 |
170 | 178 | mov pc, lr
|
171 | 179 |
|
172 | 180 | /*
|
|
0 commit comments