Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc: Fix usage of 64-bit instruction in 32-bit altivec code

e821ea70f3b4873b50056a1e0f74befed1014c09 introduced a bug by copying
some 64-bit originated code as-is to be used by both 32 and 64-bit
but this code contains a 64-bit ony "cmpdi" instruction.

This changes it to cmpwi, which is fine since VRSAVE can only contains
a 32-bit value anyway.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
CC: <stable@kernel.org>

+1 -1
+1 -1
arch/powerpc/kernel/vector.S
··· 58 58 * all 1's 59 59 */ 60 60 mfspr r4,SPRN_VRSAVE 61 - cmpdi 0,r4,0 61 + cmpwi 0,r4,0 62 62 bne+ 1f 63 63 li r4,-1 64 64 mtspr SPRN_VRSAVE,r4