]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/64s: move context tracking exit to interrupt exit path
authorNicholas Piggin <npiggin@gmail.com>
Sat, 30 Jan 2021 13:08:45 +0000 (23:08 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 8 Feb 2021 13:10:49 +0000 (00:10 +1100)
commitf821bc97dee4f3ee92c3668d495af49dfd720fe0
treefc411acf0adb6b0472deca1088661d60ffb0b5ca
parent1b1b6a6f4cc0ecc27745fa578cbaf912d76dbdda
powerpc/64s: move context tracking exit to interrupt exit path

The interrupt handler wrapper functions are not the ideal place to
maintain context tracking because after they return, the low level exit
code must then determine if there are interrupts to replay, or if the
task should be preempted, etc. Those paths (e.g., schedule_user) include
their own exception_enter/exit pairs to fix this up but it's a bit hacky
(see schedule_user() comments).

Ideally context tracking will go to user mode only when there are no
more interrupts or context switches or other exit processing work to
handle.

64e can not do this because it does not use the C interrupt exit code.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210130130852.2952424-36-npiggin@gmail.com
arch/powerpc/include/asm/interrupt.h
arch/powerpc/kernel/syscall_64.c