1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Port on Texas Instruments TMS320C6x architecture
5 * Copyright (C) 2004, 2009, 2010, 2011 Texas Instruments Incorporated
6 * Author: Aurelien Jacquiot (aurelien.jacquiot@jaluna.com)
8 #ifndef _ASM_C6X_SWITCH_TO_H
9 #define _ASM_C6X_SWITCH_TO_H
11 #include <linux/linkage.h>
13 #define prepare_to_switch() do { } while (0)
17 asmlinkage
void *__switch_to(struct thread_struct
*prev
,
18 struct thread_struct
*next
,
19 struct task_struct
*tsk
);
21 #define switch_to(prev, next, last) \
23 current->thread.wchan = (u_long) __builtin_return_address(0); \
24 (last) = __switch_to(&(prev)->thread, \
25 &(next)->thread, (prev)); \
27 current->thread.wchan = 0; \
30 #endif /* _ASM_C6X_SWITCH_TO_H */