mirror of
https://github.com/torvalds/linux.git
synced 2024-12-13 22:53:20 +00:00
bf90e1eab6
Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Cc: Al Viro <viro@ZenIV.linux.org.uk> Cc: Thomas Gleixner <tglx@linutronix.de>
42 lines
928 B
C
42 lines
928 B
C
/*
|
|
* Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*/
|
|
|
|
#ifndef _ASM_ARC_SWITCH_TO_H
|
|
#define _ASM_ARC_SWITCH_TO_H
|
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
#include <linux/sched.h>
|
|
|
|
#ifdef CONFIG_ARC_FPU_SAVE_RESTORE
|
|
|
|
extern void fpu_save_restore(struct task_struct *p, struct task_struct *n);
|
|
#define ARC_FPU_PREV(p, n) fpu_save_restore(p, n)
|
|
#define ARC_FPU_NEXT(t)
|
|
|
|
#else
|
|
|
|
#define ARC_FPU_PREV(p, n)
|
|
#define ARC_FPU_NEXT(n)
|
|
|
|
#endif /* !CONFIG_ARC_FPU_SAVE_RESTORE */
|
|
|
|
struct task_struct *__switch_to(struct task_struct *p, struct task_struct *n);
|
|
|
|
#define switch_to(prev, next, last) \
|
|
do { \
|
|
ARC_FPU_PREV(prev, next); \
|
|
last = __switch_to(prev, next);\
|
|
ARC_FPU_NEXT(next); \
|
|
mb(); \
|
|
} while (0)
|
|
|
|
#endif
|
|
|
|
#endif
|