[PATCH v3 2/5] ARM: pm: add generic CPU suspend/resume support
saeed bishara
saeed.bishara at gmail.com
Mon Feb 7 09:58:05 EST 2011
>> I fully agree with you, but what I was suggesting is to create
>> temporary identity page table at boot time, the resume code will load
>> that page table (Context ID will be loaded with unique ASID), enable
>> mmu, then the original page table and Context ID will be restored.
>
> That's much easier to do in C code than in the assembly code. Let's
> keep the assembly code as simple as possible...
well, the allocation of the identity page table doesn't need to be
done in assembly code. this is the similar to what you did in
__cpu_up.
for example, this allocation can be done in arch/arm/kernel/setup.c.
the assembly code only need to know the offset of this page table.
looks that there are several usages for the identity page table (smp
boot, kexec, pm), maybe all those clients can share the same one.
you may also consider loading this identity page table before calling
suspend flow, thus saving all the v:p stuff, and the resume code will
take care for restoring the original page table after enabling the
mmu.
saeed
More information about the linux-arm-kernel
mailing list