.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) |
---|
3 | | - * |
---|
4 | | - * This program is free software; you can redistribute it and/or modify |
---|
5 | | - * it under the terms of the GNU General Public License version 2 as |
---|
6 | | - * published by the Free Software Foundation. |
---|
7 | 4 | */ |
---|
8 | 5 | |
---|
9 | 6 | #ifndef _ASM_ARC_SWITCH_TO_H |
---|
.. | .. |
---|
12 | 9 | #ifndef __ASSEMBLY__ |
---|
13 | 10 | |
---|
14 | 11 | #include <linux/sched.h> |
---|
15 | | - |
---|
16 | | -#ifdef CONFIG_ARC_FPU_SAVE_RESTORE |
---|
17 | | - |
---|
18 | | -extern void fpu_save_restore(struct task_struct *p, struct task_struct *n); |
---|
19 | | -#define ARC_FPU_PREV(p, n) fpu_save_restore(p, n) |
---|
20 | | -#define ARC_FPU_NEXT(t) |
---|
21 | | - |
---|
22 | | -#else |
---|
23 | | - |
---|
24 | | -#define ARC_FPU_PREV(p, n) |
---|
25 | | -#define ARC_FPU_NEXT(n) |
---|
26 | | - |
---|
27 | | -#endif /* !CONFIG_ARC_FPU_SAVE_RESTORE */ |
---|
28 | | - |
---|
29 | | -#ifdef CONFIG_ARC_PLAT_EZNPS |
---|
30 | | -extern void dp_save_restore(struct task_struct *p, struct task_struct *n); |
---|
31 | | -#define ARC_EZNPS_DP_PREV(p, n) dp_save_restore(p, n) |
---|
32 | | -#else |
---|
33 | | -#define ARC_EZNPS_DP_PREV(p, n) |
---|
34 | | - |
---|
35 | | -#endif /* !CONFIG_ARC_PLAT_EZNPS */ |
---|
| 12 | +#include <asm/dsp-impl.h> |
---|
| 13 | +#include <asm/fpu.h> |
---|
36 | 14 | |
---|
37 | 15 | struct task_struct *__switch_to(struct task_struct *p, struct task_struct *n); |
---|
38 | 16 | |
---|
39 | 17 | #define switch_to(prev, next, last) \ |
---|
40 | 18 | do { \ |
---|
41 | | - ARC_EZNPS_DP_PREV(prev, next); \ |
---|
42 | | - ARC_FPU_PREV(prev, next); \ |
---|
| 19 | + dsp_save_restore(prev, next); \ |
---|
| 20 | + fpu_save_restore(prev, next); \ |
---|
43 | 21 | last = __switch_to(prev, next);\ |
---|
44 | | - ARC_FPU_NEXT(next); \ |
---|
45 | 22 | mb(); \ |
---|
46 | 23 | } while (0) |
---|
47 | 24 | |
---|