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

powerpc: Fix VMX in interrupt check in POWER7 copy loops

The enhanced prefetch hint patches corrupt the condition register
that was used to check if we are in interrupt. Fix this by using cr1.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

authored by

Anton Blanchard and committed by
Benjamin Herrenschmidt
2fae7cdb dad477cc

+4 -4
+2 -2
arch/powerpc/lib/copyuser_power7.S
··· 288 288 std r0,16(r1) 289 289 stdu r1,-STACKFRAMESIZE(r1) 290 290 bl .enter_vmx_usercopy 291 - cmpwi r3,0 291 + cmpwi cr1,r3,0 292 292 ld r0,STACKFRAMESIZE+16(r1) 293 293 ld r3,STACKFRAMESIZE+48(r1) 294 294 ld r4,STACKFRAMESIZE+56(r1) ··· 326 326 dcbt r0,r8,0b01010 /* GO */ 327 327 .machine pop 328 328 329 - beq .Lunwind_stack_nonvmx_copy 329 + beq cr1,.Lunwind_stack_nonvmx_copy 330 330 331 331 /* 332 332 * If source and destination are not relatively aligned we use a
+2 -2
arch/powerpc/lib/memcpy_power7.S
··· 222 222 std r0,16(r1) 223 223 stdu r1,-STACKFRAMESIZE(r1) 224 224 bl .enter_vmx_copy 225 - cmpwi r3,0 225 + cmpwi cr1,r3,0 226 226 ld r0,STACKFRAMESIZE+16(r1) 227 227 ld r3,STACKFRAMESIZE+48(r1) 228 228 ld r4,STACKFRAMESIZE+56(r1) ··· 260 260 dcbt r0,r8,0b01010 /* GO */ 261 261 .machine pop 262 262 263 - beq .Lunwind_stack_nonvmx_copy 263 + beq cr1,.Lunwind_stack_nonvmx_copy 264 264 265 265 /* 266 266 * If source and destination are not relatively aligned we use a