0003-ARM-8158-1-LLVMLinux-use-static-inline-in-ARM-ftrace.patch 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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
  5. With compilers which follow the C99 standard (like modern versions of gcc and
  6. clang), "extern inline" does the wrong thing (emits code for an externally
  7. linkable version of the inline function). In this case using static inline
  8. and removing the NULL version of return_address in return_address.c does
  9. the right thing.
  10. Signed-off-by: Behan Webster <behanw@converseincode.com>
  11. Reviewed-by: Mark Charlebois <charlebm@gmail.com>
  12. Acked-by: Steven Rostedt <rostedt@goodmis.org>
  13. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  14. (cherry picked from commit aeea3592a13bf12861943e44fc48f1f270941f8d)
  15. Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
  16. ---
  17. arch/arm/include/asm/ftrace.h | 2 +-
  18. arch/arm/kernel/return_address.c | 5 -----
  19. 2 files changed, 1 insertion(+), 6 deletions(-)
  20. diff --git a/arch/arm/include/asm/ftrace.h b/arch/arm/include/asm/ftrace.h
  21. index f89515a..2bb8cac 100644
  22. --- a/arch/arm/include/asm/ftrace.h
  23. +++ b/arch/arm/include/asm/ftrace.h
  24. @@ -45,7 +45,7 @@ void *return_address(unsigned int);
  25. #else
  26. -extern inline void *return_address(unsigned int level)
  27. +static inline void *return_address(unsigned int level)
  28. {
  29. return NULL;
  30. }
  31. diff --git a/arch/arm/kernel/return_address.c b/arch/arm/kernel/return_address.c
  32. index 2f8f523..a3b587f 100755
  33. --- a/arch/arm/kernel/return_address.c
  34. +++ b/arch/arm/kernel/return_address.c
  35. @@ -63,11 +63,6 @@ void *return_address(unsigned int level)
  36. //#warning "TODO: return_address should use unwind tables"
  37. //#endif
  38. -void *return_address(unsigned int level)
  39. -{
  40. - return NULL;
  41. -}
  42. -
  43. #endif /* if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND) / else */
  44. EXPORT_SYMBOL_GPL(return_address);
  45. --
  46. 2.10.2