linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: kernel: fix __cpu_suspend mm switch on warm-boot
Date: Sun, 21 Dec 2014 10:50:43 +0000	[thread overview]
Message-ID: <20141221105042.GI23242@arm.com> (raw)
In-Reply-To: <1419008627-1918-1-git-send-email-lorenzo.pieralisi@arm.com>

On Fri, Dec 19, 2014 at 05:03:47PM +0000, Lorenzo Pieralisi wrote:
> On arm64 the TTBR0_EL1 register is set to either the reserved TTBR0
> page tables on boot or to the active_mm mappings belonging to user space
> processes, it must never be set to swapper_pg_dir page tables mappings.
> 
> When a CPU is booted its active_mm is set to init_mm even though its
> TTBR0_EL1 points at the reserved TTBR0 page mappings. This implies
> that when __cpu_suspend is triggered the active_mm can point at
> init_mm even if the current TTBR0_EL1 register contains the reserved
> TTBR0_EL1 mappings.

In reality, this is only an issue on the ASID rollover path, right? I
had grand plans to remove the use of a reserved ttbr value from that
code entirely. Obviously that shouldn't hold up this fix, but it would be
nice to understand the relationship (i.e. whether or not I can revert this
patch if/when I improve the ASID allocator).

Will

  reply	other threads:[~2014-12-21 10:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-19 17:03 [PATCH] arm64: kernel: fix __cpu_suspend mm switch on warm-boot Lorenzo Pieralisi
2014-12-21 10:50 ` Will Deacon [this message]
2014-12-21 11:56   ` Catalin Marinas
2014-12-21 15:48     ` Will Deacon
2014-12-22  9:49       ` Lorenzo Pieralisi
2014-12-22 11:07       ` Catalin Marinas

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=20141221105042.GI23242@arm.com \
    --to=will.deacon@arm.com \
    --cc=linux-arm-kernel@lists.infradead.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).