Skip to content

Commit

Permalink
powerpc: Fix usage of 64-bit instruction in 32-bit altivec code
Browse files Browse the repository at this point in the history
e821ea7 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>
  • Loading branch information
Benjamin Herrenschmidt committed Dec 9, 2009
1 parent bcd6acd commit e090aa8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/vector.S
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ _GLOBAL(load_up_altivec)
* all 1's
*/
mfspr r4,SPRN_VRSAVE
cmpdi 0,r4,0
cmpwi 0,r4,0
bne+ 1f
li r4,-1
mtspr SPRN_VRSAVE,r4
Expand Down

0 comments on commit e090aa8

Please sign in to comment.