-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ARM] 3707/1: iwmmxt: use the generic thread notifier infrastructure
Patch from Lennert Buytenhek This patch makes the iWMMXt context switch hook use the generic thread notifier infrastructure that was recently merged in commit d6551e8. Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
- Loading branch information
Lennert Buytenhek
authored and
Russell King
committed
Jul 1, 2006
1 parent
9b84175
commit ae95bfb
Showing
6 changed files
with
79 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/* | ||
* linux/arch/arm/kernel/iwmmxt-notifier.c | ||
* | ||
* XScale iWMMXt (Concan) context switching and handling | ||
* | ||
* Initial code: | ||
* Copyright (c) 2003, Intel Corporation | ||
* | ||
* Full lazy switching support, optimizations and more, by Nicolas Pitre | ||
* Copyright (c) 2003-2004, MontaVista Software, Inc. | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License version 2 as | ||
* published by the Free Software Foundation. | ||
*/ | ||
|
||
#include <linux/module.h> | ||
#include <linux/config.h> | ||
#include <linux/types.h> | ||
#include <linux/kernel.h> | ||
#include <linux/signal.h> | ||
#include <linux/sched.h> | ||
#include <linux/init.h> | ||
#include <asm/thread_notify.h> | ||
#include <asm/io.h> | ||
|
||
static int iwmmxt_do(struct notifier_block *self, unsigned long cmd, void *t) | ||
{ | ||
struct thread_info *thread = t; | ||
|
||
switch (cmd) { | ||
case THREAD_NOTIFY_FLUSH: | ||
/* | ||
* flush_thread() zeroes thread->fpstate, so no need | ||
* to do anything here. | ||
* | ||
* FALLTHROUGH: Ensure we don't try to overwrite our newly | ||
* initialised state information on the first fault. | ||
*/ | ||
|
||
case THREAD_NOTIFY_RELEASE: | ||
iwmmxt_task_release(thread); | ||
break; | ||
|
||
case THREAD_NOTIFY_SWITCH: | ||
iwmmxt_task_switch(thread); | ||
break; | ||
} | ||
|
||
return NOTIFY_DONE; | ||
} | ||
|
||
static struct notifier_block iwmmxt_notifier_block = { | ||
.notifier_call = iwmmxt_do, | ||
}; | ||
|
||
static int __init iwmmxt_init(void) | ||
{ | ||
thread_register_notifier(&iwmmxt_notifier_block); | ||
|
||
return 0; | ||
} | ||
|
||
late_initcall(iwmmxt_init); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters