linux-stable/arch/openrisc/include/asm
Stafford Horne 4dc70e1aad openrisc: Move FPU state out of pt_regs
My original, naive, FPU support patch had the FPCSR register stored
during both the *mode switch* and *context switch*.  This is wasteful.

Also, the original patches did not save the FPU state when handling
signals during the system call fast path.

We fix this by moving the FPCSR state to thread_struct in task_struct.
We also introduce new helper functions save_fpu and restore_fpu which
can be used to sync the FPU with thread_struct.  These functions are now
called when needed:

 - Setting up and restoring sigcontext when handling signals
 - Before and after __switch_to during context switches
 - When handling FPU exceptions
 - When reading and writing FPU register sets

In the future we can further optimize this by doing lazy FPU save and
restore.  For example, FPU sync is not needed when switching to and from
kernel threads (x86 does this).  FPU save and restore does not need to
be done two times if we have both rescheduling and signal work to do.
However, since OpenRISC FPU state is a single register, I leave these
optimizations for future consideration.

Signed-off-by: Stafford Horne <shorne@gmail.com>
2024-04-15 15:20:39 +01:00
..
bitops treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
Kbuild openrisc: Add pci bus support 2022-07-30 05:50:15 +09:00
asm-offsets.h
atomic.h locking/atomic: make atomic*_{cmp,}xchg optional 2023-06-05 09:57:14 +02:00
barrier.h openrisc: Define memory barrier mb 2021-05-15 16:00:10 +09:00
bitops.h include: move find.h from asm_generic to linux 2022-01-15 08:47:31 -08:00
bug.h openrisc: Add prototype for die to bug.h 2023-08-21 08:15:25 +01:00
cache.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
cacheflush.h openrisc: implement the new page table range API 2023-08-24 16:20:22 -07:00
cmpxchg.h locking/arch: Rename all internal __xchg() names to __arch_xchg() 2023-04-29 09:08:44 +02:00
cpuinfo.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
delay.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
elf.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
fixmap.h openrisc: Use asm-generic's version of fix_to_virt() & virt_to_fix() 2024-03-10 08:55:46 +00:00
fpu.h openrisc: Move FPU state out of pt_regs 2024-04-15 15:20:39 +01:00
futex.h futex: arch_futex_atomic_op_inuser() calling conventions change 2020-03-27 23:58:51 -04:00
io.h openrisc: mm: convert to GENERIC_IOREMAP 2023-08-18 10:12:34 -07:00
irq.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
irqflags.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
linkage.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
mmu.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
mmu_context.h openrisc: use asm-generic/mmu_context.h for no-op implementations 2020-10-27 16:02:37 +01:00
page.h arch: define CONFIG_PAGE_SIZE_*KB on all architectures 2024-03-06 19:29:09 +01:00
pgalloc.h openrisc: convert __pte_free_tlb() to use ptdescs 2023-08-21 13:37:57 -07:00
pgtable.h Add x86 shadow stack support 2023-08-31 12:20:12 -07:00
processor.h openrisc: Move FPU state out of pt_regs 2024-04-15 15:20:39 +01:00
ptrace.h openrisc: Move FPU state out of pt_regs 2024-04-15 15:20:39 +01:00
serial.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
setup.h openrisc: Fix compiler warnings in setup 2021-08-11 06:14:23 +09:00
smp.h openrisc: initial SMP support 2017-11-03 14:01:13 +09:00
spr.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
spr_defs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
string.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
syscall.h arch: remove unused function syscall_set_arguments() 2021-09-14 16:06:20 +02:00
syscalls.h openrisc: Add clone3 ABI wrapper 2021-12-04 11:12:09 +09:00
thread_info.h uaccess: remove CONFIG_SET_FS 2022-02-25 09:36:06 +01:00
time.h openrisc: add tick timer multi-core sync logic 2017-11-03 14:01:16 +09:00
timex.h openrisc: start CPU timer early in boot 2022-05-13 23:59:23 +02:00
tlb.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
tlbflush.h mm: update legacy flush_tlb_* to use vma 2021-06-29 10:53:52 -07:00
uaccess.h uaccess: remove CONFIG_SET_FS 2022-02-25 09:36:06 +01:00
unwinder.h openrisc: support framepointers and STACKTRACE_SUPPORT 2017-11-03 14:01:15 +09:00
vmalloc.h mm/vmalloc: Add empty <asm/vmalloc.h> headers and use them from <linux/vmalloc.h> 2019-12-10 10:12:55 +01:00