Commit 8d00d0c0 authored by Nick Desaulniers's avatar Nick Desaulniers Committed by Linus Torvalds

sh: prefer _THIS_IP_ to current_text_addr

As part of the effort to reduce the code duplication between _THIS_IP_
and current_text_addr(), let's consolidate callers of
current_text_addr() to use _THIS_IP_.

Link: http://lkml.kernel.org/r/20180801185331.39535-1-ndesaulniers@google.comSigned-off-by: default avatarNick Desaulniers <ndesaulniers@google.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Rich Felker <dalias@libc.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 82f7c510
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include <asm/ptrace.h> #include <asm/ptrace.h>
#include <asm/string.h> #include <asm/string.h>
#include <linux/kernel.h>
/* /*
* KEXEC_SOURCE_MEMORY_LIMIT maximum page get_free_page can return. * KEXEC_SOURCE_MEMORY_LIMIT maximum page get_free_page can return.
...@@ -61,7 +62,7 @@ static inline void crash_setup_regs(struct pt_regs *newregs, ...@@ -61,7 +62,7 @@ static inline void crash_setup_regs(struct pt_regs *newregs,
__asm__ __volatile__ ("stc gbr, %0" : "=r" (newregs->gbr)); __asm__ __volatile__ ("stc gbr, %0" : "=r" (newregs->gbr));
__asm__ __volatile__ ("stc sr, %0" : "=r" (newregs->sr)); __asm__ __volatile__ ("stc sr, %0" : "=r" (newregs->sr));
newregs->pc = (unsigned long)current_text_addr(); newregs->pc = _THIS_IP_;
} }
} }
#else #else
......
...@@ -599,7 +599,7 @@ struct dwarf_frame *dwarf_unwind_stack(unsigned long pc, ...@@ -599,7 +599,7 @@ struct dwarf_frame *dwarf_unwind_stack(unsigned long pc,
* time this function makes its first function call. * time this function makes its first function call.
*/ */
if (!pc || !prev) if (!pc || !prev)
pc = (unsigned long)current_text_addr(); pc = _THIS_IP_;
#ifdef CONFIG_FUNCTION_GRAPH_TRACER #ifdef CONFIG_FUNCTION_GRAPH_TRACER
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment