linux/arch/openrisc/kernel
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
..
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
asm-offsets.c sched,arch: Remove unused TASK_STATE offsets 2021-06-18 11:43:09 +02:00
dma.c openrisc: Fix pagewalk usage in arch_dma_{clear, set}_uncached 2022-10-08 06:11:29 +01:00
entry.S openrisc: Move FPU state out of pt_regs 2024-04-15 15:20:39 +01:00
head.S openrisc: Support floating point user api 2023-04-26 15:08:06 +01:00
irq.c irq: openrisc: perform irqentry in entry code 2021-10-26 10:13:28 +01:00
Makefile kbuild: use obj-y instead extra-y for objects placed at the head 2022-10-02 18:04:05 +09:00
module.c openrisc: Add support for more module relocations 2024-04-15 15:20:39 +01:00
or32_ksyms.c mm: remove unneeded includes of <asm/pgalloc.h> 2020-08-07 11:33:26 -07:00
process.c openrisc: Move FPU state out of pt_regs 2024-04-15 15:20:39 +01:00
prom.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
ptrace.c openrisc: Move FPU state out of pt_regs 2024-04-15 15:20:39 +01:00
setup.c openrisc: Call setup_memory() earlier in the init sequence 2024-03-10 08:55:46 +00:00
signal.c openrisc: Move FPU state out of pt_regs 2024-04-15 15:20:39 +01:00
smp.c smp: Consolidate smp_prepare_boot_cpu() 2024-03-04 12:01:54 +01:00
stacktrace.c openrisc: Fix oops caused when dumping stack 2020-08-04 10:59:45 +09:00
sync-timer.c openrisc: add tick timer multi-core sync logic 2017-11-03 14:01:16 +09:00
sys_call_table.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
time.c openrisc: Add missing prototypes for assembly called fnctions 2023-08-21 08:11:54 +01:00
traps.c openrisc: Move FPU state out of pt_regs 2024-04-15 15:20:39 +01:00
unwinder.c openrisc: unwinder: Fix grammar issue in comment 2022-06-28 17:31:24 +09:00
vmlinux.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vmlinux.lds.S objtool/idle: Validate __cpuidle code as noinstr 2023-01-13 11:48:15 +01:00