[RFC PATCH 05/17] ARM: kernel: save/restore kernel IF
Frank Hofmann
frank.hofmann at tomtom.com
Mon Jul 11 12:57:29 EDT 2011
On Mon, 11 Jul 2011, Lorenzo Pieralisi wrote:
[ ... ]
>>> The array of pointers is there to save pgdir on idle entry, one per-cpu.
>>
>> If you're going through cpu_{do_}suspend/resume, the TTBRs are
>> saved/restored anyway, what do you need to keep the virtual addresses
>> around for ?
>>
>
> Because I switch mm before calling suspend, which is called
> with a cloned pgdir. I am not sure I can avoid that.
On resume, you'll be restoring the same thread as was previously running,
right ? If so, all you do there is copying current->active_mm->pgd to some
other place ?
Also, if you'd be using cpu_suspend(), would there still be a need for
cpu_switch_mm() before ? It'd rather be a case of possibly calling that
before the MMU-off sequence / cpu_resume() ?
Or is it that you use the new pgdir to make a memory region uncacheable ?
FrankH.
More information about the linux-arm-kernel
mailing list