stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Stephen Warren <swarren@wwwdotorg.org>
Cc: James Morse <james.morse@arm.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Marc Zyngier <marc.zyngier@arm.com>,
	ARM kernel mailing list  <linux-arm-kernel@lists.infradead.org>,
	stable <stable@vger.kernel.org>
Subject: Re: "arm64: alternatives: use tpidr_el2 on VHE hosts" v4.9 backport missing edits to proc.S
Date: Wed, 8 Jan 2020 19:22:44 +0100	[thread overview]
Message-ID: <20200108182244.GA2547623@kroah.com> (raw)
In-Reply-To: <aa09fae4-5b73-22d6-b3e8-91ff8d61d623@wwwdotorg.org>

On Wed, Jan 08, 2020 at 11:08:20AM -0700, Stephen Warren wrote:
> On 1/7/20 6:09 PM, Stephen Warren wrote:
> > James,
> > 
> > I'm looking at commit 6d99b68933fbcf51f84fcbba49246ce1209ec193 ("arm64:
> > alternatives: use tpidr_el2 on VHE hosts"). When it was back-ported to
> > v4.9.x as eea59020a7f2993018ccde317387031c04c62036, the changes to
> > arch/arm64/mm/proc.S weren't included. I assume this was just an
> > accident, or was there some specific reason for this? Either way, I do
> > find that I need those changes for system suspend/resume to work in my
> > downstream vendor fork of v4.9 if I enable KVM support in .config. I'm
> > happy to send a patch for v4.9.x to add those changes back if that's the
> > way to go. v4.14.x and later don't have this issue.
> 
> Upon further investigation of git history, here's what happened:
> 
> When When 6d99b68933fb was back-ported to upstream v4.9.x as eea59020a7f2,
> proc.S didn't save/restore tpidr_el1 at all, so that's why the edits to
> proc.S were dropped as part of the backport.
> 
> Separately, in android-4.9, 0ec37136b90e ("UPSTREAM: arm64: move sp_el0 and
> tpidr_el1 into cpu_suspend_ctx") modified proc.S to save/restore tpidir_el1.
> When those two commits were later merged together in android-4.9, the
> modifications to proc.S to alternate between tpidr_el1/2 should have been
> added back in, but weren't.
> 
> Since our downstream 4.9 fork is based on android-4.9 after that merge, it
> picked up this issue and needs to be patched for it. Anyone else using
> android-4.9 would need this fix too. However, upstream 4.9.x stable doesn't
> have an issue.

Thanks for figuring this out.  If you could submit a 4.9 patch to AOSP
for this, that would be great, or I can do it myself if you have a
patch.

thanks,

greg k-h

      reply	other threads:[~2020-01-08 18:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-08  1:09 "arm64: alternatives: use tpidr_el2 on VHE hosts" v4.9 backport missing edits to proc.S Stephen Warren
2020-01-08 18:08 ` Stephen Warren
2020-01-08 18:22   ` Greg Kroah-Hartman [this message]

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=20200108182244.GA2547623@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=catalin.marinas@arm.com \
    --cc=james.morse@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=marc.zyngier@arm.com \
    --cc=stable@vger.kernel.org \
    --cc=swarren@wwwdotorg.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).