Re: [PATCH 2/6] ARM: pm: add generic CPU suspend/resume support

Russell King - ARM Linux
2011-02-15T10:51:13Z

On Mon, Feb 14, 2011 at 08:11:23PM -0800, Colin Cross wrote:
> Even with a cache flush, cpu_resume_turn_on_mmu fails because the page
> table modification, done with the cache off, ends up in memory, but
> the L2 contains the old value. When the MMU and cache are enabled,
> the 1:1 mapping disappears. The page table would need to be
> invalidated during suspend.
>
> I can avoid the problem entirely by leaving the MMU on and skipping
> cpu_resume when the CPU does not go through reset.

If you're not losing CPU state, what's the point in calling the suspend
function? It's purpose is to save CPU state ready for the CPU going to
sleep and losing power, and restoring that state when the CPU wakes up
sometime later.