board/csky: fixup gdb instructions in readme.txt
[buildroot-gz.git] / board / roseapplepi / patches / linux / 0003-ARM-8158-1-LLVMLinux-use-static-inline-in-ARM-ftrace.patch
blobda38f2667958f5ce7890875e6d6b7e2f28bf1666
1 From 8ac9a3f6dbf00d861134bea3f2c930defed6311a Mon Sep 17 00:00:00 2001
2 From: Behan Webster <behanw@converseincode.com>
3 Date: Wed, 24 Sep 2014 01:06:46 +0100
4 Subject: [PATCH] ARM: 8158/1: LLVMLinux: use static inline in ARM ftrace.h
6 With compilers which follow the C99 standard (like modern versions of gcc and
7 clang), "extern inline" does the wrong thing (emits code for an externally
8 linkable version of the inline function). In this case using static inline
9 and removing the NULL version of return_address in return_address.c does
10 the right thing.
12 Signed-off-by: Behan Webster <behanw@converseincode.com>
13 Reviewed-by: Mark Charlebois <charlebm@gmail.com>
14 Acked-by: Steven Rostedt <rostedt@goodmis.org>
15 Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 (cherry picked from commit aeea3592a13bf12861943e44fc48f1f270941f8d)
17 Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
18 ---
19 arch/arm/include/asm/ftrace.h | 2 +-
20 arch/arm/kernel/return_address.c | 5 -----
21 2 files changed, 1 insertion(+), 6 deletions(-)
23 diff --git a/arch/arm/include/asm/ftrace.h b/arch/arm/include/asm/ftrace.h
24 index f89515a..2bb8cac 100644
25 --- a/arch/arm/include/asm/ftrace.h
26 +++ b/arch/arm/include/asm/ftrace.h
27 @@ -45,7 +45,7 @@ void *return_address(unsigned int);
29 #else
31 -extern inline void *return_address(unsigned int level)
32 +static inline void *return_address(unsigned int level)
34 return NULL;
36 diff --git a/arch/arm/kernel/return_address.c b/arch/arm/kernel/return_address.c
37 index 2f8f523..a3b587f 100755
38 --- a/arch/arm/kernel/return_address.c
39 +++ b/arch/arm/kernel/return_address.c
40 @@ -63,11 +63,6 @@ void *return_address(unsigned int level)
41 //#warning "TODO: return_address should use unwind tables"
42 //#endif
44 -void *return_address(unsigned int level)
46 - return NULL;
49 #endif /* if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND) / else */
51 EXPORT_SYMBOL_GPL(return_address);
52 --
53 2.10.2