staging: rtl8192u: remove redundant assignment to pointer crypt
[linux/fpc-iii.git] / arch / arc / include / asm / switch_to.h
blob77f123385e960849c60c7257531996e3b218d335
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
4 */
6 #ifndef _ASM_ARC_SWITCH_TO_H
7 #define _ASM_ARC_SWITCH_TO_H
9 #ifndef __ASSEMBLY__
11 #include <linux/sched.h>
13 #ifdef CONFIG_ARC_FPU_SAVE_RESTORE
15 extern void fpu_save_restore(struct task_struct *p, struct task_struct *n);
16 #define ARC_FPU_PREV(p, n) fpu_save_restore(p, n)
17 #define ARC_FPU_NEXT(t)
19 #else
21 #define ARC_FPU_PREV(p, n)
22 #define ARC_FPU_NEXT(n)
24 #endif /* !CONFIG_ARC_FPU_SAVE_RESTORE */
26 #ifdef CONFIG_ARC_PLAT_EZNPS
27 extern void dp_save_restore(struct task_struct *p, struct task_struct *n);
28 #define ARC_EZNPS_DP_PREV(p, n) dp_save_restore(p, n)
29 #else
30 #define ARC_EZNPS_DP_PREV(p, n)
32 #endif /* !CONFIG_ARC_PLAT_EZNPS */
34 struct task_struct *__switch_to(struct task_struct *p, struct task_struct *n);
36 #define switch_to(prev, next, last) \
37 do { \
38 ARC_EZNPS_DP_PREV(prev, next); \
39 ARC_FPU_PREV(prev, next); \
40 last = __switch_to(prev, next);\
41 ARC_FPU_NEXT(next); \
42 mb(); \
43 } while (0)
45 #endif
47 #endif