android_kernel_xiaomi_sdm845/arch/powerpc
Benjamin Herrenschmidt 3035c8634f powerpc/mm: Fix some SMP issues with MMU context handling
This patch fixes a couple of issues that can happen as a result
of steal_context() dropping the context_lock when all possible
PIDs are ineligible for stealing (hopefully an extremely hard to
hit occurence).

This case exposes the possibility of a stale context_mm[] entry
to be seen since destroy_context() doesn't clear it and the free
map isn't re-tested. It also means steal_context() will not notice
a context freed while the lock was help, thus possibly trying to
steal a context when a free one was available.

This fixes it by always returning to the caller from steal_context
when it dropped the lock with a return value that causes the
caller to re-samble the number of free contexts, along with
properly clearing the context_mm[] array for destroyed contexts.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2009-06-09 16:42:21 +10:00
..
boot powerpc/virtex: Add ml510 reference design device tree 2009-06-06 10:16:00 -06:00
configs powerpc/ps3: Update ps3_defconfig 2009-05-18 15:19:05 +10:00
include/asm powerpc: Add PTRACE_SINGLEBLOCK support 2009-06-09 13:29:25 +10:00
kernel powerpc: Add PTRACE_SINGLEBLOCK support 2009-06-09 13:29:25 +10:00
kvm KVM: ppc: e500: Fix the bug that KVM is unstable in SMP 2009-03-24 11:03:15 +02:00
lib powerpc: Move dma-noncoherent.c from arch/powerpc/lib to arch/powerpc/mm 2009-05-27 16:32:05 +10:00
math-emu powerpc/math-emu: Fix efp dependence 2009-03-11 06:00:08 -05:00
mm powerpc/mm: Fix some SMP issues with MMU context handling 2009-06-09 16:42:21 +10:00
oprofile powerpc/oprofile: Remove unused dump_pmcs() in FSL oprofile 2009-05-19 00:46:13 -05:00
platforms powerpc/virtex: Add Xilinx ML510 reference design support 2009-06-06 10:15:24 -06:00
sysdev powerpc/virtex: Add Xilinx ML510 reference design support 2009-06-06 10:15:24 -06:00
xmon powerpc/xmon: Add dl command to dump contents of __log_buf 2009-05-21 15:44:25 +10:00
Kconfig Merge branch 'merge' into next 2009-05-29 13:54:52 +10:00
Kconfig.debug powerpc: Keep track of emulated instructions 2009-05-21 15:44:26 +10:00
Makefile powerpc/math-emu: Fix efp dependence 2009-03-11 06:00:08 -05:00