arch/tile: adopt prepare_exit_to_usermode() model from x86
authorChris Metcalf <cmetcalf@ezchip.com>
Tue, 22 Sep 2015 18:49:41 +0000 (14:49 -0400)
committerChris Metcalf <cmetcalf@ezchip.com>
Mon, 18 Jan 2016 19:49:09 +0000 (14:49 -0500)
commit583b24a210ada7e88fc12aaf50024975ec882816
treeb396bc95a44f29d9dd2c8bab86fcd0d0728b24b1
parent65a792e84f25d1436698f999224b2cf5d7594546
arch/tile: adopt prepare_exit_to_usermode() model from x86

This change is a prerequisite change for TASK_ISOLATION but also
stands on its own for readability and maintainability.  The existing
tile do_work_pending() was called in a loop from assembly on
the slow path; this change moves the loop into C code as well.
For the x86 version see commit c5c46f59e4e7 ("x86/entry: Add new,
comprehensible entry and exit handlers written in C").

This change exposes a pre-existing bug on the older tilepro platform;
the singlestep processing is done last, but on tilepro (unlike tilegx)
we enable interrupts while doing that processing, so we could in
theory miss a signal or other asynchronous event.  A future change
could fix this by breaking the singlestep work into a "prepare"
step done in the main loop, and a "trigger" step done after exiting
the loop.  Since this change is intended as purely a restructuring
change, we call out the bug explicitly now, but don't yet fix it.

Signed-off-by: Chris Metcalf <cmetcalf@ezchip.com>
arch/tile/include/asm/processor.h
arch/tile/include/asm/thread_info.h
arch/tile/kernel/intvec_32.S
arch/tile/kernel/intvec_64.S
arch/tile/kernel/process.c
This page took 0.024122 seconds and 5 git commands to generate.