Skip to content

ARM: vfp: Reimplement dispatch and support logic in C

Ard Biesheuvel linux-arm-kernel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest8 patches 0 repliesNew

Changes in v2 from the cover letter

- rebase onto v6.4-rc2
- add Arnd's ack to #2
- fix issue in #7 regarding access to struct pt_regs to update the user PC
- move residual FPE-only undef dispatch asm code to nwfpe/entry.S (#8)

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8ARM: vfp: Record VFP bounces as perf emulation faultsarch/arm/vfp/vfpmodule.c+2 -00 replies
2/8ARM: vfp: Remove workaround for Feroceon CPUsarch/arm/mm/proc-feroceon.S arch/arm/vfp/vfphw.S arch/arm/vfp/vfpmodule.c+9 -70 replies
3/8ARM: vfp: Reimplement VFP exception entry in C codearch/arm/vfp/entry.S arch/arm/vfp/vfp.h arch/arm/vfp/vfphw.S +1 more+124 -2160 replies
4/8ARM: kernel: Get rid of thread_info::used_cp[] arrayarch/arm/include/asm/thread_info.h arch/arm/kernel/asm-offsets.c arch/arm/kernel/entry-armv.S +2 more+0 -110 replies
5/8ARM: vfp: Use undef hook for handling VFP exceptionsarch/arm/kernel/entry-armv.S arch/arm/vfp/Makefile arch/arm/vfp/entry.S +1 more+54 -1410 replies
6/8ARM: entry: Disregard Thumb undef exception in coproc dispatcharch/arm/kernel/entry-armv.S+18 -1030 replies
7/8ARM: iwmmxt: Use undef hook to enable coprocessor for taskarch/arm/include/asm/thread_info.h arch/arm/kernel/entry-armv.S arch/arm/kernel/iwmmxt.S +2 more+33 -40 replies
8/8ARM: entry: Make asm coproc dispatch code NWFPE onlyarch/arm/kernel/entry-armv.S arch/arm/nwfpe/entry.S+79 -910 replies

Reviews trailers per patch

All 8 patches have a Reviewed-by or Acked-by.

PatchLinus WalleijNicolas PitreArnd Bergmann
1/8R-b
2/8R-b A-b A-b
3/8A-b
4/8R-b
5/8R-b
6/8A-b
7/8R-b
8/8R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [PATCH v2 0/8] ARM: vfp: Reimplement dispatch and support logic in C

This is a follow-up to [0] 'ARM: vfp: Switch to C API to en/disable softirqs', which fixed some issues introduced by a prior series of mine that relaxed the requirement for kernel mode NEON to only run in task context [1].

As it turns out, the VFP dispatch logic in the entry code as well as the VFP support code that triages the exceptions are good candidates for receiving the same treatment: we now have the undef_hook API for matching PSR values and opcodes, and the exceptions are all ultimately routed to C code anyway, now that we return via __local_bh_enable_ip() back to the caller. So most of this logic can be moved to C.

So let's clean this up: reimplement the VFP handling in C code, so that we can get rid of most of the asm code that deals with this.

Changes since v1:
- rebase onto v6.4-rc2
- add Arnd's ack to #2
- fix issue in #7 regarding access to struct pt_regs to update the user PC
- move residual FPE-only undef dispatch asm code to nwfpe/entry.S (#8)

This v2 can be found at [2]. KernelCI test results for this version of the series can be found at [3].

Changes since [0]:
- drop bogus patch 'fixing' the iWMMXT dispatch logic
- add some acks from Nico and Linus
- rip out even more asm code in patch #6 - there is no need to load the opcode from user space at all when entering in Thumb mode

[0] https://lore.kernel.org/all/[email protected]/
[1] https://lore.kernel.org/all/[email protected]/
[2] https://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git/log/?h=arm-vfp-softirq-fixes
[3] https://linux.kernelci.org/test/job/ardb/branch/for-kernelci/kernel/arm-vfp-refactor-for-rmk/

Cc Linus Walleij <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Russell King <[email protected]>
Cc Nicolas Pitre <[email protected]>

Ard Biesheuvel (8):
ARM: vfp: Record VFP bounces as perf emulation faults
ARM: vfp: Remove workaround for Feroceon CPUs
ARM: vfp: Reimplement VFP exception entry in C code
ARM: kernel: Get rid of thread_info::used_cp[] array
ARM: vfp: Use undef hook for handling VFP exceptions
ARM: entry: Disregard Thumb undef exception in coproc dispatch
ARM: iwmmxt: Use undef hook to enable coprocessor for task
ARM: entry: Make asm coproc dispatch code NWFPE only

 arch/arm/include/asm/thread_info.h |  17 +-
 arch/arm/kernel/asm-offsets.c      |   1 -
 arch/arm/kernel/entry-armv.S       | 254 +-------------------
 arch/arm/kernel/iwmmxt.S           |  18 +-
 arch/arm/kernel/pj4-cp0.c          |   1 +
 arch/arm/kernel/process.c          |   1 -
 arch/arm/kernel/ptrace.c           |   2 -
 arch/arm/kernel/xscale-cp0.c       |   1 +
 arch/arm/mm/proc-feroceon.S        |   4 +
 arch/arm/nwfpe/entry.S             |  77 ++++++
 arch/arm/vfp/Makefile              |   2 +-
 arch/arm/vfp/entry.S               |  31 ---
 arch/arm/vfp/vfp.h                 |   1 +
 arch/arm/vfp/vfphw.S               | 208 ++--------------
 arch/arm/vfp/vfpmodule.c           | 208 +++++++++++-----
 15 files changed, 286 insertions(+), 540 deletions(-)
 delete mode 100644 arch/arm/vfp/entry.S
Signature · 7 lines
2.39.2


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel