Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/module: Fix stubs for BE

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: b1ce369e82 ("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>

authored by

Rusty Russell and committed by
Benjamin Herrenschmidt
872aa779 bd0c30e3

+1 -1
+1 -1
arch/powerpc/kernel/module_64.c
··· 134 134 0xe98b0020, /* ld r12,32(r11) */ 135 135 #if !defined(_CALL_ELF) || _CALL_ELF != 2 136 136 /* Set up new r2 from function descriptor */ 137 - 0xe84b0026, /* ld r2,40(r11) */ 137 + 0xe84b0028, /* ld r2,40(r11) */ 138 138 #endif 139 139 0x7d8903a6, /* mtctr r12 */ 140 140 0x4e800420 /* bctr */