aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-12-08 13:45:45 -0500
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-12-09 02:10:12 -0500
commite090aa80321b64c3b793f3b047e31ecf1af9538d (patch)
tree30ddd96363a873ae8203f42a063a4d2d1cd63d6b /arch/powerpc
parentbcd6acd51f3d4d1ada201e9bc5c40a31d6d80c71 (diff)
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>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/kernel/vector.S2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/vector.S b/arch/powerpc/kernel/vector.S
index 67b6916f0e94..fe460482fa68 100644
--- a/arch/powerpc/kernel/vector.S
+++ b/arch/powerpc/kernel/vector.S
@@ -58,7 +58,7 @@ _GLOBAL(load_up_altivec)
58 * all 1's 58 * all 1's
59 */ 59 */
60 mfspr r4,SPRN_VRSAVE 60 mfspr r4,SPRN_VRSAVE
61 cmpdi 0,r4,0 61 cmpwi 0,r4,0
62 bne+ 1f 62 bne+ 1f
63 li r4,-1 63 li r4,-1
64 mtspr SPRN_VRSAVE,r4 64 mtspr SPRN_VRSAVE,r4