Linux 6.13-rc4
[linux.git] / arch / openrisc / include / asm / fpu.h
blob57bc44d80d538f5ca2f911684bca20d660186c47
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __ASM_OPENRISC_FPU_H
3 #define __ASM_OPENRISC_FPU_H
5 struct task_struct;
7 #ifdef CONFIG_FPU
8 static inline void save_fpu(struct task_struct *task)
10 task->thread.fpcsr = mfspr(SPR_FPCSR);
13 static inline void restore_fpu(struct task_struct *task)
15 mtspr(SPR_FPCSR, task->thread.fpcsr);
17 #else
18 #define save_fpu(tsk) do { } while (0)
19 #define restore_fpu(tsk) do { } while (0)
20 #endif
22 #endif /* __ASM_OPENRISC_FPU_H */