public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Sachin Sant <sachinp@in•ibm.com>
To: Benjamin Herrenschmidt <benh@kernel•crashing.org>
Cc: linuxppc-dev@ozlabs•org, rostedt@goodmis•org
Subject: [PATCH] Ftrace : fix function_graph tracer OOPS
Date: Thu, 08 Oct 2009 20:21:47 +0530	[thread overview]
Message-ID: <4ACDFC83.4080205@in.ibm.com> (raw)
In-Reply-To: <1254906621.2409.1.camel@pasglop>

[-- Attachment #1: Type: text/plain, Size: 282 bytes --]

Enabling function graph causes oops due to usage of LOAD_REG_IMMEDIATE().
As explained by Ben the usage of LOAD_REG_IMMEDIATE generates relocs that are
not supported when CONFIG_RELOCATABLE is set.

Switch to LOAD_REG_ADDR().

Signed-off-by : Sachin Sant <sachinp@in•ibm.com>
---



[-- Attachment #2: fix_ftrace_function_graph.patch --]
[-- Type: text/x-patch, Size: 845 bytes --]

Enabling function graph causes oops due to usage of LOAD_REG_IMMEDIATE().
As explained by Ben the usage of LOAD_REG_IMMEDIATE generates relocs that are
not supported when CONFIG_RELOCATABLE is set. 

Switch to LOAD_REG_ADDR().

Signed-off-by : Sachin Sant <sachinp@in•ibm.com>
---
diff -Naurp old/arch/powerpc/kernel/entry_64.S new/arch/powerpc/kernel/entry_64.S
--- old/arch/powerpc/kernel/entry_64.S	2009-10-08 18:37:44.000000000 +0530
+++ new/arch/powerpc/kernel/entry_64.S	2009-10-08 18:34:33.000000000 +0530
@@ -1038,8 +1038,8 @@ _GLOBAL(mod_return_to_handler)
 	 * We are in a module using the module's TOC.
 	 * Switch to our TOC to run inside the core kernel.
 	 */
-	LOAD_REG_IMMEDIATE(r4,ftrace_return_to_handler)
-	ld	r2, 8(r4)
+	ld	r2, PACATOC(r13)
+	LOAD_REG_ADDR(r4,ftrace_return_to_handler)
 
 	bl	.ftrace_return_to_handler
 	nop

  reply	other threads:[~2009-10-08 14:51 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-14 10:26 [FTRACE] Enabling function_graph causes OOPS Sachin Sant
2009-07-14 22:45 ` Steven Rostedt
2009-08-03 10:40   ` Sachin Sant
2009-09-09  1:05     ` Steven Rostedt
2009-09-09  6:27       ` Sachin Sant
2009-09-09 19:42         ` Steven Rostedt
2009-09-10  5:32           ` Sachin Sant
2009-09-11  3:05             ` Steven Rostedt
2009-09-11  4:26               ` Sachin Sant
2009-09-11 18:05             ` Steven Rostedt
2009-09-13  4:07         ` Steven Rostedt
2009-09-13  4:37           ` Benjamin Herrenschmidt
2009-09-13 13:21             ` Steven Rostedt
2009-09-13 20:25               ` Benjamin Herrenschmidt
2009-09-14  8:00                 ` Benjamin Herrenschmidt
2009-10-05 13:25                   ` Steven Rostedt
2009-10-05 20:20                     ` Benjamin Herrenschmidt
2009-10-05 20:37                       ` Steven Rostedt
2009-10-07  8:56                         ` Sachin Sant
2009-10-07  9:10                           ` Benjamin Herrenschmidt
2009-10-08 14:51                             ` Sachin Sant [this message]
2009-10-14  3:01                               ` [PATCH] Ftrace : fix function_graph tracer OOPS Steven Rostedt
2009-10-14  6:13                                 ` Sachin Sant
2009-10-14  6:15                                   ` Benjamin Herrenschmidt
2009-10-14 12:12                                     ` Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4ACDFC83.4080205@in.ibm.com \
    --to=sachinp@in$(echo .)ibm.com \
    --cc=benh@kernel$(echo .)crashing.org \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    --cc=rostedt@goodmis$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox