All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/14] arm64: entry: migrate more code to C
@ 2021-05-10 15:56 Mark Rutland
  2021-05-10 15:56 ` [PATCH 01/14] arm64: remove redundant local_daif_mask() in bad_mode() Mark Rutland
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: Mark Rutland @ 2021-05-10 15:56 UTC (permalink / raw)
  To: linux-arm-kernel, will, catalin.marinas; +Cc: james.morse, mark.rutland, maz

This series (based on v5.13-rc1) migrates most of the remaining
exception triage assembly to C. All the exception vectors are given C
handlers, so that we can defer all decision making to C code, and the
assembly code can be made simpler and more uniform.

I've stopped short of converting the ret_to_user / work_pending loop.
Converting this cleanly will probably need something like the wrappers
generated by SYSCALL_DEFINE() to handle the common entry/exit logic, and
this is easier to build once all the handlers have been converted to C.
Similar is true for portions of kernel_entry and kernel_exit that could
be converted to C.

It should also be possible to generate the vectors and their associated
assembly handlers in one go by placing these in separate sections and
using .pushsection and .popsection. I've held off doing this for now as
this probably requires some changes to the linker script, and regardless
it should be easier to make that change atop this series.

So far this has seen some light boot testing, and had survived a few
hours under Syzkaller, which I intend to leave running for a while.

I've pushed the series to my arm64/entry/rework branch on kernel.org:

  https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/log/?h=arm64/entry/rework
  git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git arm64/entry/rework

Thanks,
Mark.

Mark Rutland (14):
  arm64: remove redundant local_daif_mask() in bad_mode()
  arm64: entry: unmask IRQ+FIQ after EL0 handling
  arm64: entry: convert SError handlers to C
  arm64: entry: move arm64_preempt_schedule_irq to entry-common.c
  arm64: entry: move preempt logic to C
  arm64: entry: add a call_on_irq_stack helper
  arm64: entry: convert IRQ+FIQ handlers to C
  arm64: entry: organise entry handlers consistently
  arm64: entry: organise entry vectors consistently
  arm64: entry: consolidate EL1 exception returns
  arm64: entry: move bad_mode() to entry-common.c
  arm64: entry: improve bad_mode()
  arm64: entry: template the entry asm functions
  arm64: entry: handle all vectors with C

 arch/arm64/include/asm/exception.h |  27 ++-
 arch/arm64/include/asm/processor.h |   2 -
 arch/arm64/kernel/entry-common.c   | 185 ++++++++++++++++++-
 arch/arm64/kernel/entry.S          | 354 ++++++++++---------------------------
 arch/arm64/kernel/process.c        |  17 --
 arch/arm64/kernel/traps.c          |  26 ---
 arch/arm64/mm/fault.c              |   7 -
 7 files changed, 292 insertions(+), 326 deletions(-)

-- 
2.11.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2021-05-10 16:03 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-10 15:56 [PATCH 00/14] arm64: entry: migrate more code to C Mark Rutland
2021-05-10 15:56 ` [PATCH 01/14] arm64: remove redundant local_daif_mask() in bad_mode() Mark Rutland
2021-05-10 15:56 ` [PATCH 02/14] arm64: entry: unmask IRQ+FIQ after EL0 handling Mark Rutland
2021-05-10 15:56 ` [PATCH 03/14] arm64: entry: convert SError handlers to C Mark Rutland
2021-05-10 15:56 ` [PATCH 04/14] arm64: entry: move arm64_preempt_schedule_irq to entry-common.c Mark Rutland
2021-05-10 15:56 ` [PATCH 05/14] arm64: entry: move preempt logic to C Mark Rutland
2021-05-10 15:56 ` [PATCH 06/14] arm64: entry: add a call_on_irq_stack helper Mark Rutland
2021-05-10 15:56 ` [PATCH 07/14] arm64: entry: convert IRQ+FIQ handlers to C Mark Rutland
2021-05-10 15:56 ` [PATCH 08/14] arm64: entry: organise entry handlers consistently Mark Rutland
2021-05-10 15:56 ` [PATCH 09/14] arm64: entry: organise entry vectors consistently Mark Rutland
2021-05-10 15:56 ` [PATCH 10/14] arm64: entry: consolidate EL1 exception returns Mark Rutland
2021-05-10 15:56 ` [PATCH 11/14] arm64: entry: move bad_mode() to entry-common.c Mark Rutland
2021-05-10 15:56 ` [PATCH 12/14] arm64: entry: improve bad_mode() Mark Rutland
2021-05-10 15:56 ` [PATCH 13/14] arm64: entry: template the entry asm functions Mark Rutland
2021-05-10 15:56 ` [PATCH 14/14] arm64: entry: handle all vectors with C Mark Rutland

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.