treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / arch / arc / plat-eznps / ctop.c
blobb398e6e838a9e6b3e9b0985d684e61a806fd0bba
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3 * Copyright(c) 2015 EZchip Technologies.
4 */
6 #include <linux/sched.h>
7 #include <asm/processor.h>
8 #include <plat/ctop.h>
10 void dp_save_restore(struct task_struct *prev, struct task_struct *next)
12 struct eznps_dp *prev_task_dp = &prev->thread.dp;
13 struct eznps_dp *next_task_dp = &next->thread.dp;
15 /* Here we save all Data Plane related auxiliary registers */
16 prev_task_dp->eflags = read_aux_reg(CTOP_AUX_EFLAGS);
17 write_aux_reg(CTOP_AUX_EFLAGS, next_task_dp->eflags);
19 prev_task_dp->gpa1 = read_aux_reg(CTOP_AUX_GPA1);
20 write_aux_reg(CTOP_AUX_GPA1, next_task_dp->gpa1);