Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2fae7cdb authored by Anton Blanchard's avatar Anton Blanchard Committed by Benjamin Herrenschmidt
Browse files

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: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent dad477cc
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -288,7 +288,7 @@ err1; stb r0,0(r3)
	std	r0,16(r1)
	std	r0,16(r1)
	stdu	r1,-STACKFRAMESIZE(r1)
	stdu	r1,-STACKFRAMESIZE(r1)
	bl	.enter_vmx_usercopy
	bl	.enter_vmx_usercopy
	cmpwi	r3,0
	cmpwi	cr1,r3,0
	ld	r0,STACKFRAMESIZE+16(r1)
	ld	r0,STACKFRAMESIZE+16(r1)
	ld	r3,STACKFRAMESIZE+48(r1)
	ld	r3,STACKFRAMESIZE+48(r1)
	ld	r4,STACKFRAMESIZE+56(r1)
	ld	r4,STACKFRAMESIZE+56(r1)
@@ -326,7 +326,7 @@ err1; stb r0,0(r3)
	dcbt	r0,r8,0b01010	/* GO */
	dcbt	r0,r8,0b01010	/* GO */
.machine pop
.machine pop


	beq	.Lunwind_stack_nonvmx_copy
	beq	cr1,.Lunwind_stack_nonvmx_copy


	/*
	/*
	 * If source and destination are not relatively aligned we use a
	 * If source and destination are not relatively aligned we use a
+2 −2
Original line number Original line Diff line number Diff line
@@ -222,7 +222,7 @@ _GLOBAL(memcpy_power7)
	std	r0,16(r1)
	std	r0,16(r1)
	stdu	r1,-STACKFRAMESIZE(r1)
	stdu	r1,-STACKFRAMESIZE(r1)
	bl	.enter_vmx_copy
	bl	.enter_vmx_copy
	cmpwi	r3,0
	cmpwi	cr1,r3,0
	ld	r0,STACKFRAMESIZE+16(r1)
	ld	r0,STACKFRAMESIZE+16(r1)
	ld	r3,STACKFRAMESIZE+48(r1)
	ld	r3,STACKFRAMESIZE+48(r1)
	ld	r4,STACKFRAMESIZE+56(r1)
	ld	r4,STACKFRAMESIZE+56(r1)
@@ -260,7 +260,7 @@ _GLOBAL(memcpy_power7)
	dcbt	r0,r8,0b01010	/* GO */
	dcbt	r0,r8,0b01010	/* GO */
.machine pop
.machine pop


	beq	.Lunwind_stack_nonvmx_copy
	beq	cr1,.Lunwind_stack_nonvmx_copy


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