linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86/kexec: prefer _THIS_IP_ to current_text_addr
@ 2018-08-01 21:08 Nick Desaulniers
  2018-08-08 23:06 ` Nick Desaulniers
  0 siblings, 1 reply; 8+ messages in thread
From: Nick Desaulniers @ 2018-08-01 21:08 UTC (permalink / raw)
  To: tglx, mingo, hpa
  Cc: natechancellor, Nick Desaulniers, x86, Philippe Ombredanne,
	Kate Stewart, Greg Kroah-Hartman, linux-kernel

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_.

Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
---
 arch/x86/include/asm/kexec.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/x86/include/asm/kexec.h b/arch/x86/include/asm/kexec.h
index f327236f0fa7..86924d594ecd 100644
--- a/arch/x86/include/asm/kexec.h
+++ b/arch/x86/include/asm/kexec.h
@@ -21,6 +21,7 @@
 #ifndef __ASSEMBLY__
 
 #include <linux/string.h>
+#include <linux/kernel.h>
 
 #include <asm/page.h>
 #include <asm/ptrace.h>
@@ -132,7 +133,7 @@ static inline void crash_setup_regs(struct pt_regs *newregs,
 		asm volatile("movl %%cs, %%eax;" :"=a"(newregs->cs));
 		asm volatile("pushfq; popq %0" :"=m"(newregs->flags));
 #endif
-		newregs->ip = (unsigned long)current_text_addr();
+		newregs->ip = _THIS_IP_;
 	}
 }
 
-- 
2.18.0.597.ga71716f1ad-goog


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-08-27  7:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-01 21:08 [PATCH] x86/kexec: prefer _THIS_IP_ to current_text_addr Nick Desaulniers
2018-08-08 23:06 ` Nick Desaulniers
2018-08-13 21:32   ` Nick Desaulniers
2018-08-20 17:58     ` Nick Desaulniers
2018-08-20 23:48       ` Linus Torvalds
2018-08-21 12:40         ` Eric W. Biederman
2018-08-21 16:26           ` Nick Desaulniers
     [not found]             ` <20180821202900.208417-1-ndesaulniers@google.com>
     [not found]               ` <207784db-4fcc-85e7-a0b2-fec26b7dab81@gmx.de>
     [not found]                 ` <c62e4e00-fb8f-19a6-f3eb-bde60118cb1a@zytor.com>
     [not found]                   ` <81141365-8168-799b-f34f-da5f92efaaf9@zytor.com>
     [not found]                     ` <7f49eeab-a5cc-867f-58fb-abd266f9c2c9@zytor.com>
     [not found]                       ` <6ca8a1d3-ff95-e9f4-f003-0a5af85bcb6f@zytor.com>
     [not found]                         ` <CA+55aFzuSCKfmgT9efHuwtan+m3+bPh4BpwbZwn5gGX_H=Thuw@mail.gmail.com>
2018-08-27  7:43                           ` [PATCH] treewide: remove current_text_addr Nicholas Piggin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).