1 ###############################################################################
3 # MN10300 Context switch operation
5 # Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
6 # Written by David Howells (dhowells@redhat.com)
8 # This program is free software; you can redistribute it and/or
9 # modify it under the terms of the GNU General Public Licence
10 # as published by the Free Software Foundation; either version
11 # 2 of the Licence, or (at your option) any later version.
13 ###############################################################################
14 #include <linux/sys.h>
15 #include <linux/linkage.h>
16 #include <asm/thread_info.h>
17 #include <asm/cpu-regs.h>
21 ###############################################################################
23 # struct task_struct *__switch_to(struct thread_struct *prev,
24 # struct thread_struct *next,
25 # struct task_struct *prev_task)
27 ###############################################################################
29 movm [d2,d3,a2,a3,exreg1],(sp)
39 mov d0,(THREAD_FRAME,a0)
57 #ifdef CONFIG_MN10300_CURRENT_IN_E2
61 mov (THREAD_FRAME,a1),a2
64 mov d2,d0 # for ret_from_fork
65 mov d0,a0 # for __switch_to
71 ret [d2,d3,a2,a3,exreg1],32