um: Use asm-generic/switch_to.h
authorRichard Weinberger <richard@nod.at>
Thu, 29 Mar 2012 17:10:42 +0000 (19:10 +0200)
committerRichard Weinberger <richard@nod.at>
Mon, 9 Apr 2012 22:13:45 +0000 (00:13 +0200)
Signed-off-by: Richard Weinberger <richard@nod.at>
arch/um/include/asm/Kbuild
arch/um/kernel/process.c
arch/x86/um/asm/switch_to.h [deleted file]

index bb5d6e68829b68b2d6345df2780bf0547fcb331e..fff24352255df0b0b448c43f11e287d5011fb836 100644 (file)
@@ -1,3 +1,4 @@
 generic-y += bug.h cputime.h device.h emergency-restart.h futex.h hardirq.h
 generic-y += hw_irq.h irq_regs.h kdebug.h percpu.h sections.h topology.h xor.h
 generic-y += ftrace.h pci.h io.h param.h delay.h mutex.h current.h exec.h
+generic-y += switch_to.h
index f386d04a84a526df7a51a13cbc6c1636543071fe..2b73dedb44cacdda741b3e5774346c93b37b1b22 100644 (file)
@@ -88,11 +88,8 @@ static inline void set_current(struct task_struct *task)
 
 extern void arch_switch_to(struct task_struct *to);
 
-void *_switch_to(void *prev, void *next, void *last)
+void *__switch_to(struct task_struct *from, struct task_struct *to)
 {
-       struct task_struct *from = prev;
-       struct task_struct *to = next;
-
        to->thread.prev_sched = from;
        set_current(to);
 
@@ -111,7 +108,6 @@ void *_switch_to(void *prev, void *next, void *last)
        } while (current->thread.saved_task);
 
        return current->thread.prev_sched;
-
 }
 
 void interrupt_end(void)
diff --git a/arch/x86/um/asm/switch_to.h b/arch/x86/um/asm/switch_to.h
deleted file mode 100644 (file)
index cf97d20..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef _ASM_UM_SWITCH_TO_H_
-#define _ASM_UM_SWITCH_TO_H_
-
-extern void *_switch_to(void *prev, void *next, void *last);
-#define switch_to(prev, next, last) prev = _switch_to(prev, next, last)
-
-#endif