diff options
author | Chris Metcalf <cmetcalf@tilera.com> | 2013-07-23 17:18:05 -0400 |
---|---|---|
committer | Chris Metcalf <cmetcalf@tilera.com> | 2013-07-31 11:49:48 -0400 |
commit | 7d937719e3c5c6c9ad00584f6b62230d2ef7f9f1 (patch) | |
tree | 93b965e43300b1f0a0538c924a3a9b43a371a299 /arch/tile/kernel/process.c | |
parent | 8e42e211e4fef2b2026c7f99092542f00dd817f3 (diff) | |
download | blackbird-obmc-linux-7d937719e3c5c6c9ad00584f6b62230d2ef7f9f1.tar.gz blackbird-obmc-linux-7d937719e3c5c6c9ad00584f6b62230d2ef7f9f1.zip |
tile: various minor cleanups to hardwall subsystem
First, clean up active hardwalls in exit_thread(). This is a better
place than in arch_release_thread_info().
Second, mask out any non-online cpus from the cpumask after
validating any required semantics of the cpu set.
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Diffstat (limited to 'arch/tile/kernel/process.c')
-rw-r--r-- | arch/tile/kernel/process.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/arch/tile/kernel/process.c b/arch/tile/kernel/process.c index 8ac304484f98..8d6c51d55762 100644 --- a/arch/tile/kernel/process.c +++ b/arch/tile/kernel/process.c @@ -74,19 +74,6 @@ void arch_release_thread_info(struct thread_info *info) { struct single_step_state *step_state = info->step_state; -#ifdef CONFIG_HARDWALL - /* - * We free a thread_info from the context of the task that has - * been scheduled next, so the original task is already dead. - * Calling deactivate here just frees up the data structures. - * If the task we're freeing held the last reference to a - * hardwall fd, it would have been released prior to this point - * anyway via exit_files(), and the hardwall_task.info pointers - * would be NULL by now. - */ - hardwall_deactivate_all(info->task); -#endif - if (step_state) { /* @@ -564,7 +551,15 @@ void flush_thread(void) */ void exit_thread(void) { - /* Nothing */ +#ifdef CONFIG_HARDWALL + /* + * Remove the task from the list of tasks that are associated + * with any live hardwalls. (If the task that is exiting held + * the last reference to a hardwall fd, it would already have + * been released and deactivated at this point.) + */ + hardwall_deactivate_all(current); +#endif } void show_regs(struct pt_regs *regs) |