Skip to content

Commit b1ce369

Browse files
rustyrussellantonblanchard
authored andcommitted
powerpc: modules: use r12 for stub jump address.
In ELFv2, r12 is supposed to equal to PC on entry to a function. Our stubs use r11, so change swap that with r12. Signed-off-by: Rusty Russell <[email protected]>
1 parent d2fae54 commit b1ce369

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

arch/powerpc/kernel/module_64.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,13 @@ struct ppc64_stub_entry
6767
r2) into the stub. */
6868
static struct ppc64_stub_entry ppc64_stub =
6969
{ .jump = {
70-
0x3d820000, /* addis r12,r2, <high> */
71-
0x398c0000, /* addi r12,r12, <low> */
70+
0x3d620000, /* addis r11,r2, <high> */
71+
0x396b0000, /* addi r11,r11, <low> */
7272
/* Save current r2 value in magic place on the stack. */
7373
0xf8410000|R2_STACK_OFFSET, /* std r2,R2_STACK_OFFSET(r1) */
74-
0xe96c0020, /* ld r11,32(r12) */
75-
0xe84c0028, /* ld r2,40(r12) */
76-
0x7d6903a6, /* mtctr r11 */
74+
0xe98b0020, /* ld r12,32(r11) */
75+
0xe84b0026, /* ld r2,40(r11) */
76+
0x7d8903a6, /* mtctr r12 */
7777
0x4e800420 /* bctr */
7878
} };
7979

0 commit comments

Comments
 (0)