diff options
Diffstat (limited to 'arch/arm/kernel/process.c')
-rw-r--r-- | arch/arm/kernel/process.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index 17c38dbf2f3c..e1c77ee885a7 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <asm/leds.h> | 33 | #include <asm/leds.h> |
34 | #include <asm/processor.h> | 34 | #include <asm/processor.h> |
35 | #include <asm/system.h> | 35 | #include <asm/system.h> |
36 | #include <asm/thread_notify.h> | ||
36 | #include <asm/uaccess.h> | 37 | #include <asm/uaccess.h> |
37 | #include <asm/mach/time.h> | 38 | #include <asm/mach/time.h> |
38 | 39 | ||
@@ -338,13 +339,9 @@ void exit_thread(void) | |||
338 | { | 339 | { |
339 | } | 340 | } |
340 | 341 | ||
341 | static void default_fp_init(union fp_state *fp) | 342 | ATOMIC_NOTIFIER_HEAD(thread_notify_head); |
342 | { | ||
343 | memset(fp, 0, sizeof(union fp_state)); | ||
344 | } | ||
345 | 343 | ||
346 | void (*fp_init)(union fp_state *) = default_fp_init; | 344 | EXPORT_SYMBOL_GPL(thread_notify_head); |
347 | EXPORT_SYMBOL(fp_init); | ||
348 | 345 | ||
349 | void flush_thread(void) | 346 | void flush_thread(void) |
350 | { | 347 | { |
@@ -353,22 +350,21 @@ void flush_thread(void) | |||
353 | 350 | ||
354 | memset(thread->used_cp, 0, sizeof(thread->used_cp)); | 351 | memset(thread->used_cp, 0, sizeof(thread->used_cp)); |
355 | memset(&tsk->thread.debug, 0, sizeof(struct debug_info)); | 352 | memset(&tsk->thread.debug, 0, sizeof(struct debug_info)); |
353 | memset(&thread->fpstate, 0, sizeof(union fp_state)); | ||
354 | |||
355 | thread_notify(THREAD_NOTIFY_FLUSH, thread); | ||
356 | #if defined(CONFIG_IWMMXT) | 356 | #if defined(CONFIG_IWMMXT) |
357 | iwmmxt_task_release(thread); | 357 | iwmmxt_task_release(thread); |
358 | #endif | 358 | #endif |
359 | fp_init(&thread->fpstate); | ||
360 | #if defined(CONFIG_VFP) | ||
361 | vfp_flush_thread(&thread->vfpstate); | ||
362 | #endif | ||
363 | } | 359 | } |
364 | 360 | ||
365 | void release_thread(struct task_struct *dead_task) | 361 | void release_thread(struct task_struct *dead_task) |
366 | { | 362 | { |
367 | #if defined(CONFIG_VFP) | 363 | struct thread_info *thread = task_thread_info(dead_task); |
368 | vfp_release_thread(&task_thread_info(dead_task)->vfpstate); | 364 | |
369 | #endif | 365 | thread_notify(THREAD_NOTIFY_RELEASE, thread); |
370 | #if defined(CONFIG_IWMMXT) | 366 | #if defined(CONFIG_IWMMXT) |
371 | iwmmxt_task_release(task_thread_info(dead_task)); | 367 | iwmmxt_task_release(thread); |
372 | #endif | 368 | #endif |
373 | } | 369 | } |
374 | 370 | ||