root/arch/arc/plat-eznps/ctop.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. dp_save_restore

   1 // SPDX-License-Identifier: GPL-2.0-only
   2 /*
   3  * Copyright(c) 2015 EZchip Technologies.
   4  */
   5 
   6 #include <linux/sched.h>
   7 #include <asm/processor.h>
   8 #include <plat/ctop.h>
   9 
  10 void dp_save_restore(struct task_struct *prev, struct task_struct *next)
  11 {
  12         struct eznps_dp *prev_task_dp = &prev->thread.dp;
  13         struct eznps_dp *next_task_dp = &next->thread.dp;
  14 
  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);
  18 
  19         prev_task_dp->gpa1 = read_aux_reg(CTOP_AUX_GPA1);
  20         write_aux_reg(CTOP_AUX_GPA1, next_task_dp->gpa1);
  21 }

/* [<][>][^][v][top][bottom][index][help] */