Skip to content

Commit

Permalink
powerpc/module: Fix stubs for BE
Browse files Browse the repository at this point in the history
A simple patch which was supposed to swap r12 and r11 also
inexplicably changed the offset by two bytes.  This instruction
(to load r2) isn't used in LE, so it wasn't noticed.

Fixes: b1ce369 ("powerpc: modules: use r12 for stub jump address.)
Reported-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Tested-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
  • Loading branch information
Rusty Russell authored and Benjamin Herrenschmidt committed May 20, 2014
1 parent bd0c30e commit 872aa77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/module_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ static u32 ppc64_stub_insns[] = {
0xe98b0020, /* ld r12,32(r11) */
#if !defined(_CALL_ELF) || _CALL_ELF != 2
/* Set up new r2 from function descriptor */
0xe84b0026, /* ld r2,40(r11) */
0xe84b0028, /* ld r2,40(r11) */
#endif
0x7d8903a6, /* mtctr r12 */
0x4e800420 /* bctr */
Expand Down

0 comments on commit 872aa77

Please sign in to comment.