fpu.S (2e21dee6a46a66e4c2ced778485e1044101edee4) fpu.S (cb8a2ef0848ca80d67d6d56e2df757cfdf6b3355)
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Author: Lu Zeng <zenglu@loongson.cn>
4 * Pei Huang <huangpei@loongson.cn>
5 * Huacai Chen <chenhuacai@loongson.cn>
6 *
7 * Copyright (C) 2020-2022 Loongson Technology Corporation Limited
8 */
9#include <linux/export.h>
10#include <asm/asm.h>
11#include <asm/asmmacro.h>
12#include <asm/asm-extable.h>
13#include <asm/asm-offsets.h>
14#include <asm/errno.h>
15#include <asm/fpregdef.h>
16#include <asm/loongarch.h>
17#include <asm/regdef.h>
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Author: Lu Zeng <zenglu@loongson.cn>
4 * Pei Huang <huangpei@loongson.cn>
5 * Huacai Chen <chenhuacai@loongson.cn>
6 *
7 * Copyright (C) 2020-2022 Loongson Technology Corporation Limited
8 */
9#include <linux/export.h>
10#include <asm/asm.h>
11#include <asm/asmmacro.h>
12#include <asm/asm-extable.h>
13#include <asm/asm-offsets.h>
14#include <asm/errno.h>
15#include <asm/fpregdef.h>
16#include <asm/loongarch.h>
17#include <asm/regdef.h>
18#include <asm/unwind_hints.h>
18
19#define FPU_REG_WIDTH 8
20#define LSX_REG_WIDTH 16
21#define LASX_REG_WIDTH 32
22
23 .macro EX insn, reg, src, offs
24.ex\@: \insn \reg, \src, \offs
25 _asm_extable .ex\@, .L_fpu_fault

--- 495 unchanged lines hidden (view full) ---

521 sc_restore_fcsr a2, t1
522 li.w a0, 0 # success
523 jr ra
524SYM_FUNC_END(_restore_lasx_context)
525
526.L_fpu_fault:
527 li.w a0, -EFAULT # failure
528 jr ra
19
20#define FPU_REG_WIDTH 8
21#define LSX_REG_WIDTH 16
22#define LASX_REG_WIDTH 32
23
24 .macro EX insn, reg, src, offs
25.ex\@: \insn \reg, \src, \offs
26 _asm_extable .ex\@, .L_fpu_fault

--- 495 unchanged lines hidden (view full) ---

522 sc_restore_fcsr a2, t1
523 li.w a0, 0 # success
524 jr ra
525SYM_FUNC_END(_restore_lasx_context)
526
527.L_fpu_fault:
528 li.w a0, -EFAULT # failure
529 jr ra
530
531#ifdef CONFIG_CPU_HAS_LBT
532STACK_FRAME_NON_STANDARD _restore_fp
533STACK_FRAME_NON_STANDARD _restore_lsx
534STACK_FRAME_NON_STANDARD _restore_lasx
535#endif