linux/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
asm-offsets.h
atomic.h locking/atomic: make atomic*_{cmp,}xchg optional 2023-06-05 09:57:14 +02:00
barrier.h
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
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
delay.h
elf.h
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
io.h openrisc: mm: convert to GENERIC_IOREMAP 2023-08-18 10:12:34 -07:00
irq.h
irqflags.h
Kbuild openrisc: Add pci bus support 2022-07-30 05:50:15 +09:00
linkage.h
mmu.h
mmu_context.h
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
setup.h
smp.h
spr.h
spr_defs.h
string.h
syscall.h
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
timex.h openrisc: start CPU timer early in boot 2022-05-13 23:59:23 +02:00
tlb.h
tlbflush.h
uaccess.h uaccess: remove CONFIG_SET_FS 2022-02-25 09:36:06 +01:00
unwinder.h
vmalloc.h