Oliver O'Halloran 01d7c2a2de powerpc/process: Fix altivec SPR not being saved
In save_sprs() in process.c contains the following test:

	if (cpu_has_feature(cpu_has_feature(CPU_FTR_ALTIVEC)))
		t->vrsave = mfspr(SPRN_VRSAVE);

CPU feature with the mask 0x1 is CPU_FTR_COHERENT_ICACHE so the test
is equivilent to:

	if (cpu_has_feature(CPU_FTR_ALTIVEC) &&
		cpu_has_feature(CPU_FTR_COHERENT_ICACHE))

On CPUs without support for both (i.e G5) this results in vrsave not
being saved between context switches. The vector register save/restore
code doesn't use VRSAVE to determine which registers to save/restore,
but the value of VRSAVE is used to determine if altivec is being used
in several code paths.

Fixes: 152d523e6307 ("powerpc: Create context switch helpers save_sprs() and restore_sprs()")
Cc: stable@vger.kernel.org
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2016-03-29 12:08:08 +11:00
..
2016-01-20 17:09:18 -08:00
2016-01-20 17:09:18 -08:00
2016-03-09 09:58:19 +11:00
2014-11-27 09:32:58 +11:00
2014-09-25 23:14:46 +10:00
2014-11-03 12:12:32 +11:00
2015-08-06 15:10:20 +10:00
2016-02-22 20:47:48 +11:00
2016-03-11 17:20:12 -06:00
2015-03-24 13:15:52 +11:00
2014-12-11 17:48:14 -08:00
2015-12-17 22:40:56 +11:00
2015-12-14 20:40:32 +11:00
2015-12-14 20:40:32 +11:00
2016-03-19 15:38:41 -07:00
2015-12-02 19:34:40 +11:00
2015-12-16 12:54:04 +11:00
2016-03-19 15:38:41 -07:00
2015-04-07 17:15:13 +10:00
2015-06-24 17:49:38 -07:00