linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, Peter Zijlstra <peterz@infradead.org>,
	Andy Lutomirski <luto@kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86: use register variable to get stack pointer value
Date: Fri, 29 Sep 2017 10:38:28 -0500	[thread overview]
Message-ID: <20170929153828.rtxwllhsjgiaeaos@treble> (raw)
In-Reply-To: <20170929141537.29167-1-aryabinin@virtuozzo.com>

On Fri, Sep 29, 2017 at 05:15:36PM +0300, Andrey Ryabinin wrote:
> Currently we use current_stack_pointer() function to get the value
> of the stack pointer register. Since commit f5caf621ee35
> ("x86/asm: Fix inline asm call constraints for Clang") we have stack
> register variable declared. It can be used instead of current_stack_pointer()
> function which allows to optimize away some excessive "mov %rsp, %<dst>"
> instructions:
> 
> -mov    %rsp,%rdx
> -sub    %rdx,%rax
> -cmp    $0x3fff,%rax
> -ja     ffffffff810722fd <ist_begin_non_atomic+0x2d>
> 
> +sub    %rsp,%rax
> +cmp    $0x3fff,%rax
> +ja     ffffffff810722fa <ist_begin_non_atomic+0x2a>
> 
> Remove current_stack_pointer(), rename __asm_call_sp to current_stack_pointer
> and use it instead of removed function.
> 
> Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>

Reviewed-by: Josh Poimboeuf <jpoimboe@redhat.com>

-- 
Josh

  reply	other threads:[~2017-09-29 15:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-29 14:15 [PATCH] x86: use register variable to get stack pointer value Andrey Ryabinin
2017-09-29 15:38 ` Josh Poimboeuf [this message]
2017-09-29 18:37   ` Andy Lutomirski
2017-09-29 19:16     ` Josh Poimboeuf
2017-09-29 20:15 ` [tip:x86/urgent] x86/asm: Use " tip-bot for Andrey Ryabinin

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=20170929153828.rtxwllhsjgiaeaos@treble \
    --to=jpoimboe@redhat.com \
    --cc=aryabinin@virtuozzo.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --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).