aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorroger blofeld <blofeldus@yahoo.com>2012-06-21 01:27:14 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-07-11 00:23:32 -0400
commitfd5a42980e1cf327b7240adf5e7b51ea41c23437 (patch)
treee9469b78a83be2d8573999897fdd7509a12f353f
parentac84aa2b3b9b791eac45174d1966d5fdf3bbba1c (diff)
powerpc/ftrace: Fix assembly trampoline register usage
Just like the module loader, ftrace needs to be updated to use r12 instead of r11 with newer gcc's. Signed-off-by: Roger Blofeld <blofeldus@yahoo.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> CC: stable@vger.kernel.org
-rw-r--r--arch/powerpc/kernel/ftrace.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/powerpc/kernel/ftrace.c b/arch/powerpc/kernel/ftrace.c
index 6f33296a0570..91b46b7f6f0d 100644
--- a/arch/powerpc/kernel/ftrace.c
+++ b/arch/powerpc/kernel/ftrace.c
@@ -240,9 +240,9 @@ __ftrace_make_nop(struct module *mod,
240 240
241 /* 241 /*
242 * On PPC32 the trampoline looks like: 242 * On PPC32 the trampoline looks like:
243 * 0x3d, 0x60, 0x00, 0x00 lis r11,sym@ha 243 * 0x3d, 0x80, 0x00, 0x00 lis r12,sym@ha
244 * 0x39, 0x6b, 0x00, 0x00 addi r11,r11,sym@l 244 * 0x39, 0x8c, 0x00, 0x00 addi r12,r12,sym@l
245 * 0x7d, 0x69, 0x03, 0xa6 mtctr r11 245 * 0x7d, 0x89, 0x03, 0xa6 mtctr r12
246 * 0x4e, 0x80, 0x04, 0x20 bctr 246 * 0x4e, 0x80, 0x04, 0x20 bctr
247 */ 247 */
248 248
@@ -257,9 +257,9 @@ __ftrace_make_nop(struct module *mod,
257 pr_devel(" %08x %08x ", jmp[0], jmp[1]); 257 pr_devel(" %08x %08x ", jmp[0], jmp[1]);
258 258
259 /* verify that this is what we expect it to be */ 259 /* verify that this is what we expect it to be */
260 if (((jmp[0] & 0xffff0000) != 0x3d600000) || 260 if (((jmp[0] & 0xffff0000) != 0x3d800000) ||
261 ((jmp[1] & 0xffff0000) != 0x396b0000) || 261 ((jmp[1] & 0xffff0000) != 0x398c0000) ||
262 (jmp[2] != 0x7d6903a6) || 262 (jmp[2] != 0x7d8903a6) ||
263 (jmp[3] != 0x4e800420)) { 263 (jmp[3] != 0x4e800420)) {
264 printk(KERN_ERR "Not a trampoline\n"); 264 printk(KERN_ERR "Not a trampoline\n");
265 return -EINVAL; 265 return -EINVAL;