1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright(c) 2015 EZchip Technologies.
6 #include <linux/sched.h>
7 #include <asm/processor.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
);