aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/vfp/vfpmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/vfp/vfpmodule.c')
-rw-r--r--arch/arm/vfp/vfpmodule.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c
index bbf3da012afd..1c88bbdfd34d 100644
--- a/arch/arm/vfp/vfpmodule.c
+++ b/arch/arm/vfp/vfpmodule.c
@@ -104,12 +104,17 @@ static void vfp_thread_exit(struct thread_info *thread)
104static int vfp_notifier(struct notifier_block *self, unsigned long cmd, void *v) 104static int vfp_notifier(struct notifier_block *self, unsigned long cmd, void *v)
105{ 105{
106 struct thread_info *thread = v; 106 struct thread_info *thread = v;
107 u32 fpexc;
108#ifdef CONFIG_SMP
109 unsigned int cpu;
110#endif
107 111
108 if (likely(cmd == THREAD_NOTIFY_SWITCH)) { 112 switch (cmd) {
109 u32 fpexc = fmrx(FPEXC); 113 case THREAD_NOTIFY_SWITCH:
114 fpexc = fmrx(FPEXC);
110 115
111#ifdef CONFIG_SMP 116#ifdef CONFIG_SMP
112 unsigned int cpu = thread->cpu; 117 cpu = thread->cpu;
113 118
114 /* 119 /*
115 * On SMP, if VFP is enabled, save the old state in 120 * On SMP, if VFP is enabled, save the old state in
@@ -134,13 +139,16 @@ static int vfp_notifier(struct notifier_block *self, unsigned long cmd, void *v)
134 * old state. 139 * old state.
135 */ 140 */
136 fmxr(FPEXC, fpexc & ~FPEXC_EN); 141 fmxr(FPEXC, fpexc & ~FPEXC_EN);
137 return NOTIFY_DONE; 142 break;
138 }
139 143
140 if (cmd == THREAD_NOTIFY_FLUSH) 144 case THREAD_NOTIFY_FLUSH:
141 vfp_thread_flush(thread); 145 vfp_thread_flush(thread);
142 else 146 break;
147
148 case THREAD_NOTIFY_EXIT:
143 vfp_thread_exit(thread); 149 vfp_thread_exit(thread);
150 break;
151 }
144 152
145 return NOTIFY_DONE; 153 return NOTIFY_DONE;
146} 154}