Skip to contentSkip to conversation

Fix corruption in hcall9

PATCH New Anton Blanchard 1 participant 1 message Jan 8, 2007 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix corruption in hcall9

It looks to me like we are corrupting r12 in the hcall9 function. Although we have r0 free we cant use offsets against it, so save away r12 in there instead.

---

arch/powerpc/platforms/pseries/hvCall.S +2 -1
diff -ru linux-2.6.20-rc3-orig/arch/powerpc/platforms/pseries/hvCall.S linux-2.6.20-rc3/arch/powerpc/platforms/pseries/hvCall.S
@@ -145,6 +145,7 @@
 
 	HVSC				/* invoke the hypervisor */
 
+	mr	r0,r12
 	ld	r12,STK_PARM(r4)(r1)
 	std	r4,  0(r12)
 	std	r5,  8(r12)
@@ -154,7 +155,7 @@
 	std	r9, 40(r12)
 	std	r10,48(r12)
 	std	r11,56(r12)
-	std	r12,64(r12)
+	std	r0, 64(r12)
 
 	HCALL_INST_POSTCALL