Skip to content

Commit 2fae7cd

Browse files
antonblanchardozbenh
authored andcommitted
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>
1 parent dad477c commit 2fae7cd

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

arch/powerpc/lib/copyuser_power7.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ err1; stb r0,0(r3)
288288
std r0,16(r1)
289289
stdu r1,-STACKFRAMESIZE(r1)
290290
bl .enter_vmx_usercopy
291-
cmpwi r3,0
291+
cmpwi cr1,r3,0
292292
ld r0,STACKFRAMESIZE+16(r1)
293293
ld r3,STACKFRAMESIZE+48(r1)
294294
ld r4,STACKFRAMESIZE+56(r1)
@@ -326,7 +326,7 @@ err1; stb r0,0(r3)
326326
dcbt r0,r8,0b01010 /* GO */
327327
.machine pop
328328

329-
beq .Lunwind_stack_nonvmx_copy
329+
beq cr1,.Lunwind_stack_nonvmx_copy
330330

331331
/*
332332
* If source and destination are not relatively aligned we use a

arch/powerpc/lib/memcpy_power7.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ _GLOBAL(memcpy_power7)
222222
std r0,16(r1)
223223
stdu r1,-STACKFRAMESIZE(r1)
224224
bl .enter_vmx_copy
225-
cmpwi r3,0
225+
cmpwi cr1,r3,0
226226
ld r0,STACKFRAMESIZE+16(r1)
227227
ld r3,STACKFRAMESIZE+48(r1)
228228
ld r4,STACKFRAMESIZE+56(r1)
@@ -260,7 +260,7 @@ _GLOBAL(memcpy_power7)
260260
dcbt r0,r8,0b01010 /* GO */
261261
.machine pop
262262

263-
beq .Lunwind_stack_nonvmx_copy
263+
beq cr1,.Lunwind_stack_nonvmx_copy
264264

265265
/*
266266
* If source and destination are not relatively aligned we use a

0 commit comments

Comments
 (0)