Skip to content

Commit

Permalink
[POWERPC] Fix corruption in hcall9
Browse files Browse the repository at this point in the history
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.  r12 holds the ninth return value from
the hypervisor call, so without this fix, the caller will see the
wrong value for the ninth element in the array that gets the return
values.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Anton Blanchard authored and Paul Mackerras committed Jan 9, 2007
1 parent e75b171 commit ab87e8d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/powerpc/platforms/pseries/hvCall.S
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ _GLOBAL(plpar_hcall9)

HVSC /* invoke the hypervisor */

mr r0,r12
ld r12,STK_PARM(r4)(r1)
std r4, 0(r12)
std r5, 8(r12)
Expand All @@ -154,7 +155,7 @@ _GLOBAL(plpar_hcall9)
std r9, 40(r12)
std r10,48(r12)
std r11,56(r12)
std r12,64(r12)
std r0, 64(r12)

HCALL_INST_POSTCALL

Expand Down

0 comments on commit ab87e8d

Please sign in to comment.