summaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/ftrace.h
diff options
context:
space:
mode:
authorRabin Vincent <rabin@rab.in>2010-08-10 20:52:35 +0200
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-09-02 16:28:43 +0200
commit72dc43a9eb123d2742bd413c80dbeab0c588f622 (patch)
treed4a020340a00fc00497aedef1fcd8c6bd8abaad7 /arch/arm/include/asm/ftrace.h
parentARM: 6318/1: ftrace: fix and update dynamic ftrace (diff)
downloadlinux-72dc43a9eb123d2742bd413c80dbeab0c588f622.tar.xz
linux-72dc43a9eb123d2742bd413c80dbeab0c588f622.zip
ARM: 6319/1: ftrace: add Thumb-2 support to dynamic ftrace
Handle the different nop and call instructions for Thumb-2. Also, we need to adjust the recorded mcount_loc addresses because they have the lsb set. Cc: Catalin Marinas <catalin.marinas@arm.com> Acked-by: Steven Rostedt <rostedt@goodmis.org> [recordmcount.pl change] Signed-off-by: Rabin Vincent <rabin@rab.in> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/include/asm/ftrace.h')
-rw-r--r--arch/arm/include/asm/ftrace.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/include/asm/ftrace.h b/arch/arm/include/asm/ftrace.h
index 4a56a2ee067c..f89515adac60 100644
--- a/arch/arm/include/asm/ftrace.h
+++ b/arch/arm/include/asm/ftrace.h
@@ -18,7 +18,8 @@ struct dyn_arch_ftrace {
static inline unsigned long ftrace_call_adjust(unsigned long addr)
{
- return addr;
+ /* With Thumb-2, the recorded addresses have the lsb set */
+ return addr & ~1;
}
extern void ftrace_caller_old(void);