public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Will Deacon <will.deacon@arm.com>
To: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <Catalin.Marinas@arm.com>,
	Kevin Hilman <khilman@linaro.org>,
	Christopher Covington <cov@codeaurora.org>,
	Larry Bassel <larry.bassel@linaro.org>,
	"linaro-kernel@lists.linaro.org" <linaro-kernel@lists.linaro.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v4 2/2] arm64: enable context tracking
Date: Fri, 23 May 2014 17:12:19 +0100	[thread overview]
Message-ID: <20140523161219.GK21319@arm.com> (raw)
In-Reply-To: <20140523155544.GA24994@leverpostej>

On Fri, May 23, 2014 at 04:55:44PM +0100, Mark Rutland wrote:
> On Fri, May 23, 2014 at 03:51:07PM +0100, Catalin Marinas wrote:
> > On Fri, May 23, 2014 at 01:11:38AM +0100, Kevin Hilman wrote:
> > I haven't checked all the code paths but at least for pushing onto the
> > stack we must keep it 16-bytes aligned (architecture requirement).
> 
> Sure -- if modifying the stack we need to push/pop pairs of registers to
> keep it aligned. It might be better to use xzr as the dummy value in
> that case to make it clear that the value doesn't really matter.
> 
> That said, ct_user_enter is only called in kernel_exit before we restore
> the values off the stack, and the only register I can spot that we need
> to preserve is x0 for the syscall return value. I can't see x1 or x2
> being used any more specially than the rest of the remaining registers.
> Am I missing something, or would it be sufficient to do the following?
> 
> push	x0, xzr
> bl	context_tacking_user_enter
> pop	x0, xzr

... and if that works, then why are we using the stack instead of a
callee-saved register?

Will

  reply	other threads:[~2014-05-23 16:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-22 19:27 [PATCH v4 0/2] context tracker support for arm64 Larry Bassel
2014-05-22 19:27 ` [PATCH v4 1/2] arm64: adjust el0_sync so that a function can be called Larry Bassel
2014-05-22 20:23   ` Christopher Covington
2014-05-22 22:35     ` Larry Bassel
2014-05-23 14:44       ` Catalin Marinas
2014-05-23 17:04         ` Larry Bassel
2014-05-22 19:27 ` [PATCH v4 2/2] arm64: enable context tracking Larry Bassel
2014-05-22 20:29   ` Christopher Covington
2014-05-23  0:11     ` Kevin Hilman
2014-05-23 14:51       ` Catalin Marinas
2014-05-23 15:55         ` Mark Rutland
2014-05-23 16:12           ` Will Deacon [this message]
2014-05-24  0:03           ` Kevin Hilman
2014-05-22 20:19 ` [PATCH v4 0/2] context tracker support for arm64 Kevin Hilman

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=20140523161219.GK21319@arm.com \
    --to=will.deacon@arm.com \
    --cc=Catalin.Marinas@arm.com \
    --cc=cov@codeaurora.org \
    --cc=khilman@linaro.org \
    --cc=larry.bassel@linaro.org \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    /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