linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nick Desaulniers <ndesaulniers@google.com>
To: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com
Cc: natechancellor@gmail.com,
	Nick Desaulniers <ndesaulniers@google.com>,
	x86@kernel.org, Philippe Ombredanne <pombredanne@nexb.com>,
	Kate Stewart <kstewart@linuxfoundation.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org
Subject: [PATCH] x86/kexec: prefer _THIS_IP_ to current_text_addr
Date: Wed,  1 Aug 2018 14:08:03 -0700	[thread overview]
Message-ID: <20180801210804.175176-1-ndesaulniers@google.com> (raw)

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


             reply	other threads:[~2018-08-01 21:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-01 21:08 Nick Desaulniers [this message]
2018-08-08 23:06 ` [PATCH] x86/kexec: prefer _THIS_IP_ to current_text_addr 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180801210804.175176-1-ndesaulniers@google.com \
    --to=ndesaulniers@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hpa@zytor.com \
    --cc=kstewart@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=natechancellor@gmail.com \
    --cc=pombredanne@nexb.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).