[PATCH v3 2/5] ARM: pm: add generic CPU suspend/resume support
From: saeed bishara <hidden>
Date: 2011-02-07 14:58:05
quoted
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