Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: linux-mips@linux-mips.org
Cc: Ralf Baechle <ralf@linux-mips.org>
Subject: [patch 2/7] mips: ftrace: Fix the CONFIG_DYNAMIC_FTRACE=n compile
Date: Sat, 23 Jul 2011 12:41:23 -0000	[thread overview]
Message-ID: <20110723124016.049746199@linutronix.de> (raw)
In-Reply-To: 20110723123948.573545817@linutronix.de

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: mips-ftrace-fix-non-dynamic-crappola.patch --]
[-- Type: text/plain, Size: 2433 bytes --]

arch/mips/kernel/ftrace.c: In function ‘ftrace_get_parent_ra_addr’:
arch/mips/kernel/ftrace.c:212: error: implicit declaration of function ‘in_kernel_space’
arch/mips/kernel/ftrace.c: In function ‘prepare_ftrace_return’:
arch/mips/kernel/ftrace.c:314: error: ‘MCOUNT_OFFSET_INSNS’ undeclared (first use in this function)
arch/mips/kernel/ftrace.c:314: error: (Each undeclared identifier is reported only once
arch/mips/kernel/ftrace.c:314: error: for each function it appears in.)

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/mips/kernel/ftrace.c |   39 ++++++++++++++++++++-------------------
 1 file changed, 20 insertions(+), 19 deletions(-)

Index: linux-2.6/arch/mips/kernel/ftrace.c
===================================================================
--- linux-2.6.orig/arch/mips/kernel/ftrace.c
+++ linux-2.6/arch/mips/kernel/ftrace.c
@@ -19,6 +19,26 @@
 
 #include <asm-generic/sections.h>
 
+#if defined(KBUILD_MCOUNT_RA_ADDRESS) && defined(CONFIG_32BIT)
+#define MCOUNT_OFFSET_INSNS 5
+#else
+#define MCOUNT_OFFSET_INSNS 4
+#endif
+
+/*
+ * Check if the address is in kernel space
+ *
+ * Clone core_kernel_text() from kernel/extable.c, but doesn't call
+ * init_kernel_text() for Ftrace doesn't trace functions in init sections.
+ */
+static inline int in_kernel_space(unsigned long ip)
+{
+	if (ip >= (unsigned long)_stext &&
+	    ip <= (unsigned long)_etext)
+		return 1;
+	return 0;
+}
+
 #ifdef CONFIG_DYNAMIC_FTRACE
 
 #define JAL 0x0c000000		/* jump & link: ip --> ra, jump to target */
@@ -54,20 +74,6 @@ static inline void ftrace_dyn_arch_init_
 #endif
 }
 
-/*
- * Check if the address is in kernel space
- *
- * Clone core_kernel_text() from kernel/extable.c, but doesn't call
- * init_kernel_text() for Ftrace doesn't trace functions in init sections.
- */
-static inline int in_kernel_space(unsigned long ip)
-{
-	if (ip >= (unsigned long)_stext &&
-	    ip <= (unsigned long)_etext)
-		return 1;
-	return 0;
-}
-
 static int ftrace_modify_code(unsigned long ip, unsigned int new_code)
 {
 	int faulted;
@@ -112,11 +118,6 @@ static int ftrace_modify_code(unsigned l
  *                                  1: offset = 4 instructions
  */
 
-#if defined(KBUILD_MCOUNT_RA_ADDRESS) && defined(CONFIG_32BIT)
-#define MCOUNT_OFFSET_INSNS 5
-#else
-#define MCOUNT_OFFSET_INSNS 4
-#endif
 #define INSN_B_1F (0x10000000 | MCOUNT_OFFSET_INSNS)
 
 int ftrace_make_nop(struct module *mod,

  parent reply	other threads:[~2011-07-23 12:42 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-23 12:41 [patch 0/7] MIPS: Assorted fixlets and annotation patches Thomas Gleixner
2011-07-23 12:41 ` [patch 1/7] mips: sibyte: Add missing irq_mask function Thomas Gleixner
2011-07-27  8:41   ` Ralf Baechle
2011-07-27 14:49   ` Ralf Baechle
2011-07-23 12:41 ` Thomas Gleixner [this message]
2011-07-27  9:23   ` [patch 2/7] mips: ftrace: Fix the CONFIG_DYNAMIC_FTRACE=n compile Ralf Baechle
2011-07-23 12:41 ` [patch 3/7] mips: Enable interrupts in do_signal() Thomas Gleixner
2011-07-27 13:06   ` Ralf Baechle
2011-07-23 12:41 ` [patch 6/7] MIPS: Loongson: Mark cascade interrupts IRQF_NO_THREAD Thomas Gleixner
2011-07-27  9:55   ` Ralf Baechle
2011-07-23 12:41 ` [patch 5/7] MIPS: Mark cascade and low level " Thomas Gleixner
2011-07-27  9:53   ` Ralf Baechle
2011-07-23 12:41 ` [patch 4/7] MIPS: Make the die_lock be raw Thomas Gleixner
2011-07-27  9:51   ` Ralf Baechle
2011-07-23 12:41 ` [patch 7/7] mips: Allow forced irq threading Thomas Gleixner
2011-07-27  9:56   ` Ralf Baechle

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=20110723124016.049746199@linutronix.de \
    --to=tglx@linutronix.de \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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