Commit 6403105b authored by Anton Blanchard's avatar Anton Blanchard

powerpc/tm: Fix GOT save offset for ABIv2

The r2 TOC/GOT save offset is 40 on ABIv1 and 24 on ABIv2.
Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
parent c2e31bdc
...@@ -190,8 +190,10 @@ END_FW_FTR_SECTION_IFSET(FW_FEATURE_SPLPAR) ...@@ -190,8 +190,10 @@ END_FW_FTR_SECTION_IFSET(FW_FEATURE_SPLPAR)
#define STK_REG(i) __STK_REG(__REG_##i) #define STK_REG(i) __STK_REG(__REG_##i)
#if defined(_CALL_ELF) && _CALL_ELF == 2 #if defined(_CALL_ELF) && _CALL_ELF == 2
#define STK_GOT 24
#define __STK_PARAM(i) (32 + ((i)-3)*8) #define __STK_PARAM(i) (32 + ((i)-3)*8)
#else #else
#define STK_GOT 40
#define __STK_PARAM(i) (48 + ((i)-3)*8) #define __STK_PARAM(i) (48 + ((i)-3)*8)
#endif #endif
#define STK_PARAM(i) __STK_PARAM(__REG_##i) #define STK_PARAM(i) __STK_PARAM(__REG_##i)
......
...@@ -107,7 +107,7 @@ _GLOBAL(tm_reclaim) ...@@ -107,7 +107,7 @@ _GLOBAL(tm_reclaim)
mflr r0 mflr r0
stw r6, 8(r1) stw r6, 8(r1)
std r0, 16(r1) std r0, 16(r1)
std r2, 40(r1) std r2, STK_GOT(r1)
stdu r1, -TM_FRAME_SIZE(r1) stdu r1, -TM_FRAME_SIZE(r1)
/* We've a struct pt_regs at [r1+STACK_FRAME_OVERHEAD]. */ /* We've a struct pt_regs at [r1+STACK_FRAME_OVERHEAD]. */
...@@ -288,7 +288,7 @@ dont_backup_fp: ...@@ -288,7 +288,7 @@ dont_backup_fp:
ld r0, 16(r1) ld r0, 16(r1)
mtcr r4 mtcr r4
mtlr r0 mtlr r0
ld r2, 40(r1) ld r2, STK_GOT(r1)
/* Load system default DSCR */ /* Load system default DSCR */
ld r4, DSCR_DEFAULT@toc(r2) ld r4, DSCR_DEFAULT@toc(r2)
...@@ -311,7 +311,7 @@ _GLOBAL(__tm_recheckpoint) ...@@ -311,7 +311,7 @@ _GLOBAL(__tm_recheckpoint)
mflr r0 mflr r0
stw r5, 8(r1) stw r5, 8(r1)
std r0, 16(r1) std r0, 16(r1)
std r2, 40(r1) std r2, STK_GOT(r1)
stdu r1, -TM_FRAME_SIZE(r1) stdu r1, -TM_FRAME_SIZE(r1)
/* We've a struct pt_regs at [r1+STACK_FRAME_OVERHEAD]. /* We've a struct pt_regs at [r1+STACK_FRAME_OVERHEAD].
...@@ -447,7 +447,7 @@ restore_gprs: ...@@ -447,7 +447,7 @@ restore_gprs:
ld r0, 16(r1) ld r0, 16(r1)
mtcr r4 mtcr r4
mtlr r0 mtlr r0
ld r2, 40(r1) ld r2, STK_GOT(r1)
/* Load system default DSCR */ /* Load system default DSCR */
ld r4, DSCR_DEFAULT@toc(r2) ld r4, DSCR_DEFAULT@toc(r2)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment