diff options
Diffstat (limited to 'arch/um/kernel/process_kern.c')
-rw-r--r-- | arch/um/kernel/process_kern.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/arch/um/kernel/process_kern.c b/arch/um/kernel/process_kern.c index c23d8a08d0f..ea65db679e9 100644 --- a/arch/um/kernel/process_kern.c +++ b/arch/um/kernel/process_kern.c | |||
@@ -82,7 +82,8 @@ unsigned long alloc_stack(int order, int atomic) | |||
82 | unsigned long page; | 82 | unsigned long page; |
83 | int flags = GFP_KERNEL; | 83 | int flags = GFP_KERNEL; |
84 | 84 | ||
85 | if(atomic) flags |= GFP_ATOMIC; | 85 | if (atomic) |
86 | flags = GFP_ATOMIC; | ||
86 | page = __get_free_pages(flags, order); | 87 | page = __get_free_pages(flags, order); |
87 | if(page == 0) | 88 | if(page == 0) |
88 | return(0); | 89 | return(0); |
@@ -113,8 +114,23 @@ void set_current(void *t) | |||
113 | 114 | ||
114 | void *_switch_to(void *prev, void *next, void *last) | 115 | void *_switch_to(void *prev, void *next, void *last) |
115 | { | 116 | { |
116 | return(CHOOSE_MODE(switch_to_tt(prev, next), | 117 | struct task_struct *from = prev; |
117 | switch_to_skas(prev, next))); | 118 | struct task_struct *to= next; |
119 | |||
120 | to->thread.prev_sched = from; | ||
121 | set_current(to); | ||
122 | |||
123 | do { | ||
124 | current->thread.saved_task = NULL ; | ||
125 | CHOOSE_MODE_PROC(switch_to_tt, switch_to_skas, prev, next); | ||
126 | if(current->thread.saved_task) | ||
127 | show_regs(&(current->thread.regs)); | ||
128 | next= current->thread.saved_task; | ||
129 | prev= current; | ||
130 | } while(current->thread.saved_task); | ||
131 | |||
132 | return(current->thread.prev_sched); | ||
133 | |||
118 | } | 134 | } |
119 | 135 | ||
120 | void interrupt_end(void) | 136 | void interrupt_end(void) |