powerpc: Rework runlatch code

This moves the inlines into system.h and changes the runlatch
code to use the thread local flags (non-atomic) rather than
the TIF flags (atomic) to keep track of the latch state.

The code to turn it back on in an asynchronous interrupt is
now simplified and partially inlined.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
Benjamin Herrenschmidt
2012-03-01 12:45:27 +11:00
parent 7450f6f03e
commit fe1952fc0a
6 changed files with 89 additions and 57 deletions

View File

@@ -483,6 +483,9 @@ machine_check_common:
system_call_entry:
b system_call_common
ppc64_runlatch_on_trampoline:
b .__ppc64_runlatch_on
/*
* Here we have detected that the kernel stack pointer is bad.
* R9 contains the saved CR, r13 points to the paca,