From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: mm: ensure TTBR0 is restored when changing ASID on rollover
Date: Tue, 31 May 2011 16:39:42 +0100 [thread overview]
Message-ID: <1306856382-26295-1-git-send-email-will.deacon@arm.com> (raw)
In 52af9c6c ("ARM: 6943/1: mm: use TTBR1 instead of reserved context ID")
I updated the ASID rollover code to use only the kernel page tables
whilst updating the ASID.
Unfortunately, the code to restore the user page tables was part of a
later patch which isn't yet in mainline, so this leaves the code
quite broken.
This patch fixes the issue by calling cpu_switch_mm to change the ASID
which has the side-effect of setting up TTBR0 to point to the user
tables.
Reported-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
---
arch/arm/mm/context.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mm/context.c b/arch/arm/mm/context.c
index 8bfae96..2352395 100644
--- a/arch/arm/mm/context.c
+++ b/arch/arm/mm/context.c
@@ -100,8 +100,7 @@ static void reset_context(void *info)
set_mm_context(mm, asid);
/* set the new ASID */
- asm("mcr p15, 0, %0, c13, c0, 1\n" : : "r" (mm->context.id));
- isb();
+ cpu_switch_mm(mm->pgd, mm);
}
#else
--
1.7.0.4
next reply other threads:[~2011-05-31 15:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-31 15:39 Will Deacon [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-06-07 10:38 [PATCH] ARM: mm: ensure TTBR0 is restored when changing ASID on rollover Will Deacon
2011-06-08 13:04 ` Catalin Marinas
2011-06-08 20:01 ` Russell King - ARM Linux
2011-06-08 20:23 ` Will Deacon
2011-06-08 20:36 ` Russell King - ARM Linux
2011-06-08 20:49 ` Will Deacon
2011-06-08 20:55 ` Russell King - ARM Linux
2011-11-23 3:46 ` Stephen Boyd
2011-06-08 21:12 ` Catalin Marinas
2011-06-08 21:49 ` Russell King - ARM Linux
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=1306856382-26295-1-git-send-email-will.deacon@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).