linux/arch/powerpc
Anton Blanchard 7b296be56d powerpc: Restore correct DSCR in context switch
commit 714332858b upstream.

During a context switch we always restore the per thread DSCR value.
If we aren't doing explicit DSCR management
(ie thread.dscr_inherit == 0) and the default DSCR changed while
the process has been sleeping we end up with the wrong value.

Check thread.dscr_inherit and select the default DSCR or per thread
DSCR as required.

This was found with the following test case, when running with
more threads than CPUs (ie forcing context switching):

http://ozlabs.org/~anton/junkcode/dscr_default_test.c

With the four patches applied I can run a combination of all
test cases successfully at the same time:

http://ozlabs.org/~anton/junkcode/dscr_default_test.c
http://ozlabs.org/~anton/junkcode/dscr_explicit_test.c
http://ozlabs.org/~anton/junkcode/dscr_inherit_test.c

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-14 10:00:49 -07:00
..
boot powerpc/p1022ds: fix audio-related properties in the device tree 2011-06-22 06:14:54 -05:00
configs powerpc/pseries: remove duplicate SCSI_BNX2_ISCSI in pseries_defconfig 2011-06-29 09:28:52 +10:00
include/asm powerpc: Fix wrong divisor in usecs_to_cputime 2012-08-09 08:27:34 -07:00
kernel powerpc: Restore correct DSCR in context switch 2012-09-14 10:00:49 -07:00
kvm Merge branch 'kvm-updates/2.6.40' of git://git.kernel.org/pub/scm/virt/kvm/kvm 2011-05-23 08:42:08 -07:00
lib powerpc: Copy down exception vectors after feature fixups 2011-11-21 14:31:25 -08:00
math-emu powerpc/85xx: Fix SPE float to integer conversion failure 2011-03-15 13:48:15 -05:00
mm powerpc: Fix deadlock in icswx code 2011-11-11 09:37:11 -08:00
oprofile powerpc/oprofile: Handle events that raise an exception without overflowing 2011-05-26 13:38:57 +10:00
platforms powerpc/pmac: Fix SMP kernels on pre-core99 UP machines 2012-03-23 11:20:52 -07:00
sysdev arch/powerpc/sysdev/fsl_rio.c: correct IECSR register clear value 2011-10-03 11:39:46 -07:00
xmon powerpc/xmon: Use cpumask iterator to avoid warning 2012-07-16 08:47:35 -07:00
Kconfig arch: remove CONFIG_GENERIC_FIND_{NEXT_BIT,BIT_LE,LAST_BIT} 2011-05-26 17:12:38 -07:00
Kconfig.debug lib: consolidate DEBUG_STACK_USAGE option 2011-05-25 08:39:54 -07:00
Makefile powerpc: Fix typo in uImage target 2010-08-24 15:26:32 +10:00
relocs_check.pl