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