Skip to content

OpenRISC FPU and Signal handling fixups

Stafford Horne lkml openrisc 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5openrisc: traps: Convert printks to pr_<level> macrosarch/openrisc/kernel/traps.c+44 -440 replies
2/5openrisc: traps: Remove calls to show_registers before diearch/openrisc/kernel/traps.c+0 -30 replies
3/5openrisc: traps: Don't send signals to kernel mode threadsarch/openrisc/kernel/traps.c+29 -190 replies
4/5openrisc: Add FPU configarch/openrisc/Kconfig arch/openrisc/kernel/ptrace.c arch/openrisc/kernel/traps.c+17 -10 replies
5/5openrisc: Move FPU state out of pt_regsarch/openrisc/include/asm/fpu.h arch/openrisc/include/asm/processor.h arch/openrisc/include/asm/ptrace.h +5 more+76 -320 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] OpenRISC FPU and Signal handling fixups

This series has some fixups found when I was doing a deep dive documentation of the OpenRISC FPU support which was added in 2023.

http://stffrdhrn.github.io/hardware/embedded/openrisc/2023/08/24/or1k-fpu-linux-and-compilers.html

The FPU handling has issues of being inefficient and also not providing the proper state if signals are received when handling syscalls.

The series is small, so should be easy to see from the commit list but in summary does:

- Fixup some issues with exception handling.
- Adds CONFIG_FPU to allow disabling FPU support
- Fixups to e FPU handling logic moving the FPCSR state out of the kernel stack pt_regs and into the task_struct.

Stafford Horne (5):
openrisc: traps: Convert printks to pr_<level> macros
openrisc: traps: Remove calls to show_registers before die
openrisc: traps: Don't send signals to kernel mode threads
openrisc: Add FPU config
openrisc: Move FPU state out of pt_regs

 arch/openrisc/Kconfig                 |   9 ++
 arch/openrisc/include/asm/fpu.h       |  22 ++++
 arch/openrisc/include/asm/processor.h |   1 +
 arch/openrisc/include/asm/ptrace.h    |   3 +-
 arch/openrisc/kernel/entry.S          |  15 +--
 arch/openrisc/kernel/process.c        |   5 +
 arch/openrisc/kernel/ptrace.c         |  18 ++--
 arch/openrisc/kernel/signal.c         |  36 ++++++-
 arch/openrisc/kernel/traps.c          | 144 ++++++++++++++------------
 9 files changed, 160 insertions(+), 93 deletions(-)
 create mode 100644 arch/openrisc/include/asm/fpu.h
Signature · 1 line
2.44.0