LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix corruption in hcall9
@ 2007-01-08 15:37 Anton Blanchard
  0 siblings, 0 replies; only message in thread
From: Anton Blanchard @ 2007-01-08 15:37 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: paulus


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.

Signed-off-by: Anton Blanchard <anton@samba.org>
---

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
--- linux-2.6.20-rc3-orig/arch/powerpc/platforms/pseries/hvCall.S	2006-11-29 15:57:37.000000000 -0600
+++ linux-2.6.20-rc3/arch/powerpc/platforms/pseries/hvCall.S	2007-01-08 07:34:45.000000000 -0600
@@ -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
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-01-08 15:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-08 15:37 [PATCH] Fix corruption in hcall9 Anton Blanchard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox