aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/kernel/tt/process_kern.c
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2005-09-16 19:27:43 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-17 11:49:59 -0700
commitf6e34c6af6f18bd6c66bfb1c6a7c57068412aa73 (patch)
tree45aebccc135b870a5aff5dcf975325171c7bf891 /arch/um/kernel/tt/process_kern.c
parent[PATCH] s390: kernel stack corruption (diff)
downloadlinux-dev-f6e34c6af6f18bd6c66bfb1c6a7c57068412aa73.tar.xz
linux-dev-f6e34c6af6f18bd6c66bfb1c6a7c57068412aa73.zip
[PATCH] uml: _switch_to code consolidation
This patch moves code that is in both switch_to_tt and switch_to_skas to the top level _switch_to function, keeping us from duplicating code. It is required for the stack trace patch to work properly. Signed-off-by: Allan Graves <allan.graves@gmail.com> Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/um/kernel/tt/process_kern.c')
-rw-r--r--arch/um/kernel/tt/process_kern.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/arch/um/kernel/tt/process_kern.c b/arch/um/kernel/tt/process_kern.c
index a189a2b92935..0de05a268b22 100644
--- a/arch/um/kernel/tt/process_kern.c
+++ b/arch/um/kernel/tt/process_kern.c
@@ -26,7 +26,7 @@
#include "init.h"
#include "tt.h"
-void *switch_to_tt(void *prev, void *next, void *last)
+int switch_to_tt(void *prev, void *next, void *last)
{
struct task_struct *from, *to, *prev_sched;
unsigned long flags;
@@ -36,8 +36,6 @@ void *switch_to_tt(void *prev, void *next, void *last)
from = prev;
to = next;
- to->thread.prev_sched = from;
-
cpu = from->thread_info->cpu;
if(cpu == 0)
forward_interrupts(to->thread.mode.tt.extern_pid);
@@ -53,7 +51,6 @@ void *switch_to_tt(void *prev, void *next, void *last)
forward_pending_sigio(to->thread.mode.tt.extern_pid);
c = 0;
- set_current(to);
err = os_write_file(to->thread.mode.tt.switch_pipe[1], &c, sizeof(c));
if(err != sizeof(c))
@@ -85,8 +82,6 @@ void *switch_to_tt(void *prev, void *next, void *last)
flush_tlb_all();
local_irq_restore(flags);
-
- return(current->thread.prev_sched);
}
void release_thread_tt(struct task_struct *task)