diff options
Diffstat (limited to 'arch/arm/vfp/entry.S')
-rw-r--r-- | arch/arm/vfp/entry.S | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/arch/arm/vfp/entry.S b/arch/arm/vfp/entry.S index ba592a9e6fb3..a2bed62aec21 100644 --- a/arch/arm/vfp/entry.S +++ b/arch/arm/vfp/entry.S | |||
@@ -15,13 +15,16 @@ | |||
15 | * r10 = thread_info structure | 15 | * r10 = thread_info structure |
16 | * lr = failure return | 16 | * lr = failure return |
17 | */ | 17 | */ |
18 | #include <linux/linkage.h> | 18 | #include <asm/thread_info.h> |
19 | #include <linux/init.h> | ||
20 | #include <asm/asm-offsets.h> | ||
21 | #include <asm/assembler.h> | ||
22 | #include <asm/vfpmacros.h> | 19 | #include <asm/vfpmacros.h> |
20 | #include "../kernel/entry-header.S" | ||
23 | 21 | ||
24 | ENTRY(do_vfp) | 22 | ENTRY(do_vfp) |
23 | #ifdef CONFIG_PREEMPT | ||
24 | ldr r4, [r10, #TI_PREEMPT] @ get preempt count | ||
25 | add r11, r4, #1 @ increment it | ||
26 | str r11, [r10, #TI_PREEMPT] | ||
27 | #endif | ||
25 | enable_irq | 28 | enable_irq |
26 | ldr r4, .LCvfp | 29 | ldr r4, .LCvfp |
27 | ldr r11, [r10, #TI_CPU] @ CPU number | 30 | ldr r11, [r10, #TI_CPU] @ CPU number |
@@ -30,6 +33,12 @@ ENTRY(do_vfp) | |||
30 | ENDPROC(do_vfp) | 33 | ENDPROC(do_vfp) |
31 | 34 | ||
32 | ENTRY(vfp_null_entry) | 35 | ENTRY(vfp_null_entry) |
36 | #ifdef CONFIG_PREEMPT | ||
37 | get_thread_info r10 | ||
38 | ldr r4, [r10, #TI_PREEMPT] @ get preempt count | ||
39 | sub r11, r4, #1 @ decrement it | ||
40 | str r11, [r10, #TI_PREEMPT] | ||
41 | #endif | ||
33 | mov pc, lr | 42 | mov pc, lr |
34 | ENDPROC(vfp_null_entry) | 43 | ENDPROC(vfp_null_entry) |
35 | 44 | ||
@@ -41,6 +50,12 @@ ENDPROC(vfp_null_entry) | |||
41 | 50 | ||
42 | __INIT | 51 | __INIT |
43 | ENTRY(vfp_testing_entry) | 52 | ENTRY(vfp_testing_entry) |
53 | #ifdef CONFIG_PREEMPT | ||
54 | get_thread_info r10 | ||
55 | ldr r4, [r10, #TI_PREEMPT] @ get preempt count | ||
56 | sub r11, r4, #1 @ decrement it | ||
57 | str r11, [r10, #TI_PREEMPT] | ||
58 | #endif | ||
44 | ldr r0, VFP_arch_address | 59 | ldr r0, VFP_arch_address |
45 | str r5, [r0] @ known non-zero value | 60 | str r5, [r0] @ known non-zero value |
46 | mov pc, r9 @ we have handled the fault | 61 | mov pc, r9 @ we have handled the fault |