switch_to.h 553 B

123456789101112131415161718192021222324252627
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
  4. */
  5. #ifndef _ASM_ARC_SWITCH_TO_H
  6. #define _ASM_ARC_SWITCH_TO_H
  7. #ifndef __ASSEMBLY__
  8. #include <linux/sched.h>
  9. #include <asm/dsp-impl.h>
  10. #include <asm/fpu.h>
  11. struct task_struct *__switch_to(struct task_struct *p, struct task_struct *n);
  12. #define switch_to(prev, next, last) \
  13. do { \
  14. dsp_save_restore(prev, next); \
  15. fpu_save_restore(prev, next); \
  16. last = __switch_to(prev, next);\
  17. mb(); \
  18. } while (0)
  19. #endif
  20. #endif