aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/include
diff options
context:
space:
mode:
authorRabin Vincent <rabin@rab.in>2010-08-10 19:52:35 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-09-02 15:28:43 +0100
commit72dc43a9eb123d2742bd413c80dbeab0c588f622 (patch)
treed4a020340a00fc00497aedef1fcd8c6bd8abaad7 /arch/arm/include
parentARM: 6318/1: ftrace: fix and update dynamic ftrace (diff)
downloadlinux-dev-72dc43a9eb123d2742bd413c80dbeab0c588f622.tar.xz
linux-dev-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')
-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);