aboutsummaryrefslogtreecommitdiff
path: root/arch/loongarch/include/asm/fpu.h
diff options
context:
space:
mode:
authorGravatar Huacai Chen <chenhuacai@loongson.cn> 2023-05-01 17:19:27 +0800
committerGravatar Huacai Chen <chenhuacai@loongson.cn> 2023-05-01 17:19:27 +0800
commit2b3bd32ea3a22ea2d5e591da4ac2c2b1fb17c0e0 (patch)
tree471e30e5fb3a312649f60e7ff597039a6e8d99d8 /arch/loongarch/include/asm/fpu.h
parentLoongArch: Relay BCE exceptions to userland as SIGSEGV with si_code=SEGV_BNDERR (diff)
downloadlinux-2b3bd32ea3a22ea2d5e591da4ac2c2b1fb17c0e0.tar.gz
linux-2b3bd32ea3a22ea2d5e591da4ac2c2b1fb17c0e0.tar.bz2
linux-2b3bd32ea3a22ea2d5e591da4ac2c2b1fb17c0e0.zip
LoongArch: Provide kernel fpu functions
Provide kernel_fpu_begin()/kernel_fpu_end() to allow the kernel itself to use fpu. They can be used by some other kernel components, e.g., the AMDGPU graphic driver for DCN. Reported-by: WANG Xuerui <kernel@xen0n.name> Tested-by: WANG Xuerui <kernel@xen0n.name> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'arch/loongarch/include/asm/fpu.h')
-rw-r--r--arch/loongarch/include/asm/fpu.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/loongarch/include/asm/fpu.h b/arch/loongarch/include/asm/fpu.h
index 358b254d9c1d..192f8e35d912 100644
--- a/arch/loongarch/include/asm/fpu.h
+++ b/arch/loongarch/include/asm/fpu.h
@@ -21,6 +21,9 @@
struct sigcontext;
+extern void kernel_fpu_begin(void);
+extern void kernel_fpu_end(void);
+
extern void _init_fpu(unsigned int);
extern void _save_fp(struct loongarch_fpu *);
extern void _restore_fp(struct loongarch_fpu *);