Re: [RFC PATCH v3] ARM hibernation/suspend-to-disk support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
_______________________________________________
linux-pm mailing list
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/linux-pm


[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux