Debian Codegraph @

arch/openrisc/include/asm/fpu.h

raw
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __ASM_OPENRISC_FPU_H
3 #define __ASM_OPENRISC_FPU_H
4
5 struct task_struct;
6
7 #ifdef CONFIG_FPU
8 static inline void save_fpu(struct task_struct *task)
9 {
10 task->thread.fpcsr = mfspr(SPR_FPCSR);
11 }
12
13 static inline void restore_fpu(struct task_struct *task)
14 {
15 mtspr(SPR_FPCSR, task->thread.fpcsr);
16 }
17 #else
18 #define save_fpu(tsk) do { } while (0)
19 #define restore_fpu(tsk) do { } while (0)
20 #endif
21
22 #endif /* __ASM_OPENRISC_FPU_H */