The patch titled Subject: sh: prefer _THIS_IP_ to current_text_addr has been added to the -mm tree. Its filename is sh-prefer-_this_ip_-to-current_text_addr.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/sh-prefer-_this_ip_-to-current_text_addr.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/sh-prefer-_this_ip_-to-current_text_addr.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Nick Desaulniers <ndesaulniers@xxxxxxxxxx> Subject: 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@xxxxxxxxxx Signed-off-by: Nick Desaulniers <ndesaulniers@xxxxxxxxxx> Cc: Yoshinori Sato <ysato@xxxxxxxxxxxxxxxxxxxx> Cc: Rich Felker <dalias@xxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- arch/sh/include/asm/kexec.h | 3 ++- arch/sh/kernel/dwarf.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) --- a/arch/sh/include/asm/kexec.h~sh-prefer-_this_ip_-to-current_text_addr +++ a/arch/sh/include/asm/kexec.h @@ -4,6 +4,7 @@ #include <asm/ptrace.h> #include <asm/string.h> +#include <linux/kernel.h> /* * KEXEC_SOURCE_MEMORY_LIMIT maximum page get_free_page can return. @@ -61,7 +62,7 @@ static inline void crash_setup_regs(stru __asm__ __volatile__ ("stc gbr, %0" : "=r" (newregs->gbr)); __asm__ __volatile__ ("stc sr, %0" : "=r" (newregs->sr)); - newregs->pc = (unsigned long)current_text_addr(); + newregs->pc = _THIS_IP_; } } #else --- a/arch/sh/kernel/dwarf.c~sh-prefer-_this_ip_-to-current_text_addr +++ a/arch/sh/kernel/dwarf.c @@ -599,7 +599,7 @@ struct dwarf_frame *dwarf_unwind_stack(u * time this function makes its first function call. */ if (!pc || !prev) - pc = (unsigned long)current_text_addr(); + pc = _THIS_IP_; #ifdef CONFIG_FUNCTION_GRAPH_TRACER /* _ Patches currently in -mm which might be from ndesaulniers@xxxxxxxxxx are sh-prefer-_this_ip_-to-current_text_addr.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html