From: nico@fluxnic.net (Nicolas Pitre)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH v3] ARM hibernation/suspend-to-disk support
Date: Fri, 27 May 2011 15:27:18 -0400 (EDT) [thread overview]
Message-ID: <alpine.LFD.2.00.1105271501220.3207@xanadu.home> (raw)
In-Reply-To: <alpine.DEB.2.00.1105271549220.6109@localhost6.localdomain6>
On Fri, 27 May 2011, Frank Hofmann wrote:
> /*
> * r0 = control register value
> * r1 = v:p offset (preserved by cpu_do_resume)
> + * if this is zero, do not reenable MMU (it's on)
This is wrong. It is well possible for this to be zero when the MMU is
active.
The best way to determine if MMU is on or off is:
mrc p15, 0, rx, c1, c0 @ load ctrl reg
tst rx, #1 @ test M bit
> I wonder; is there a proper/suggested way to switch MMU off (and not end in
> binary nirvana), to have the reentry / reenable work ?
This is slightly complicated. You first need to turn of and disable the
caches, and ideally set up a 1:1 mapping for the transition. There are
cpu_proc_fin() and cpu_reset(branch_location).
You may also investigate how kexec is handled which purpose is to let
the kernel boot another kernel.
Nicolas
next prev parent reply other threads:[~2011-05-27 19:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-25 13:16 [RFC PATCH v3] ARM hibernation/suspend-to-disk support Frank Hofmann
2011-05-27 15:01 ` Frank Hofmann
2011-05-27 19:27 ` Nicolas Pitre [this message]
2011-05-31 11:50 ` Frank Hofmann
2011-06-02 22:18 ` [linux-pm] " Pavel Machek
2011-06-14 8:00 ` Frank Hofmann
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=alpine.LFD.2.00.1105271501220.3207@xanadu.home \
--to=nico@fluxnic.net \
--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