1
2
3
4
5
6#ifndef _ASM_ARC_SWITCH_TO_H
7#define _ASM_ARC_SWITCH_TO_H
8
9#ifndef __ASSEMBLY__
10
11#include <linux/sched.h>
12#include <asm/dsp-impl.h>
13#include <asm/fpu.h>
14
15#ifdef CONFIG_ARC_PLAT_EZNPS
16extern void dp_save_restore(struct task_struct *p, struct task_struct *n);
17#define ARC_EZNPS_DP_PREV(p, n) dp_save_restore(p, n)
18#else
19#define ARC_EZNPS_DP_PREV(p, n)
20
21#endif
22
23struct task_struct *__switch_to(struct task_struct *p, struct task_struct *n);
24
25#define switch_to(prev, next, last) \
26do { \
27 ARC_EZNPS_DP_PREV(prev, next); \
28 dsp_save_restore(prev, next); \
29 fpu_save_restore(prev, next); \
30 last = __switch_to(prev, next);\
31 mb(); \
32} while (0)
33
34#endif
35
36#endif
37