diff options
author | Linus Torvalds | 2019-08-17 19:36:47 +0200 |
---|---|---|
committer | Linus Torvalds | 2019-08-17 19:36:47 +0200 |
commit | 2f478b60118f48bf66eaddcca0d23e80f87a682d (patch) | |
tree | 9a4e6341f103e0e758f58b9db3e3d3a325145737 /arch/riscv/include/asm/switch_to.h | |
parent | Merge tag 'xtensa-20190816' of git://github.com/jcmvbkbc/linux-xtensa (diff) | |
parent | riscv: Make __fstate_clean() work correctly. (diff) | |
download | kernel-qcow2-linux-2f478b60118f48bf66eaddcca0d23e80f87a682d.tar.gz kernel-qcow2-linux-2f478b60118f48bf66eaddcca0d23e80f87a682d.tar.xz kernel-qcow2-linux-2f478b60118f48bf66eaddcca0d23e80f87a682d.zip |
Merge tag 'riscv/for-v5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux
Pull RISC-V fixes from Paul Walmsley:
- Two patches to fix significant bugs in floating point register
context handling
- A minor fix in RISC-V flush_tlb_page(), to supply a valid end address
to flush_tlb_range()
- Two minor defconfig additions: to build the virtio hwrng driver by
default (for QEMU targets), and to partially synchronize the 32-bit
defconfig with the 64-bit defconfig
* tag 'riscv/for-v5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
riscv: Make __fstate_clean() work correctly.
riscv: Correct the initialized flow of FP register
riscv: defconfig: Update the defconfig
riscv: rv32_defconfig: Update the defconfig
riscv: fix flush_tlb_range() end address for flush_tlb_page()
Diffstat (limited to 'arch/riscv/include/asm/switch_to.h')
-rw-r--r-- | arch/riscv/include/asm/switch_to.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/riscv/include/asm/switch_to.h b/arch/riscv/include/asm/switch_to.h index 853b65ef656d..f0227bdce0f0 100644 --- a/arch/riscv/include/asm/switch_to.h +++ b/arch/riscv/include/asm/switch_to.h @@ -16,7 +16,13 @@ extern void __fstate_restore(struct task_struct *restore_from); static inline void __fstate_clean(struct pt_regs *regs) { - regs->sstatus |= (regs->sstatus & ~(SR_FS)) | SR_FS_CLEAN; + regs->sstatus = (regs->sstatus & ~SR_FS) | SR_FS_CLEAN; +} + +static inline void fstate_off(struct task_struct *task, + struct pt_regs *regs) +{ + regs->sstatus = (regs->sstatus & ~SR_FS) | SR_FS_OFF; } static inline void fstate_save(struct task_struct *task, |