public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/4] ARM: idmap: use idmap_pgd when setting up mm for reboot
Date: Fri, 18 Nov 2011 17:21:07 +0000	[thread overview]
Message-ID: <20111118172107.GC17991@mudshark.cambridge.arm.com> (raw)
In-Reply-To: <CAHkRjk4c1Q7+q9-fc+KXc3ySwnVPXbfBGJbqL2QvpHCqtNK_Tw@mail.gmail.com>

On Fri, Nov 18, 2011 at 04:56:24PM +0000, Catalin Marinas wrote:
> On 16 November 2011 16:48, Will Deacon <will.deacon@arm.com> wrote:
> > ?void setup_mm_for_reboot(char mode)
> > ?{
> > - ? ? ? /*
> > - ? ? ? ?* We need to access to user-mode page tables here. For kernel threads
> > - ? ? ? ?* we don't have any user-mode mappings so we use the context that we
> > - ? ? ? ?* "borrowed".
> > - ? ? ? ?*/
> > - ? ? ? identity_mapping_add(current->active_mm->pgd, 0, TASK_SIZE);
> > + ? ? ? /* Clean and invalidate L1. */
> > + ? ? ? flush_cache_all();
> 
> Is the cache flushing needed here? The setup_mm_for_reboot callers do
> it after this function anyway (unless this is needed for VIVT
> caches?).

I initially added the cache flushing because we used to manipulate the page
tables at this point. We don't do that anymore, but as you say, if we have
a VIVT D-side then we do need that flush before switching to the new pgd.

One thing I will change is the following comment (/* Switch exclusively to kernel
mappings. */) because that's a bit confusing now.

Will

  reply	other threads:[~2011-11-18 17:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-16 16:48 [PATCH 0/4] Consolidate identity mapping code in idmap.c Will Deacon
2011-11-16 16:48 ` [PATCH 1/4] ARM: idmap: populate identity map pgd at init time using .init.text Will Deacon
2011-11-18 12:02   ` Catalin Marinas
2011-11-18 12:08     ` Will Deacon
2011-11-16 16:48 ` [PATCH 2/4] ARM: suspend: use idmap_pgd instead of suspend_pgd Will Deacon
2011-11-18 16:43   ` Catalin Marinas
2011-11-18 17:26     ` Will Deacon
2011-11-16 16:48 ` [PATCH 3/4] ARM: proc-*.S: place cpu_reset functions into .idmap.text section Will Deacon
2011-11-16 16:48 ` [PATCH 4/4] ARM: idmap: use idmap_pgd when setting up mm for reboot Will Deacon
2011-11-18 16:56   ` Catalin Marinas
2011-11-18 17:21     ` Will Deacon [this message]
2011-11-17 13:47 ` [PATCH 0/4] Consolidate identity mapping code in idmap.c Dave Martin

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=20111118172107.GC17991@mudshark.cambridge.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