[PATCH v3 2/5] ARM: pm: add generic CPU suspend/resume support

Russell King - ARM Linux linux at arm.linux.org.uk
Tue Feb 8 06:23:23 EST 2011


On Tue, Feb 08, 2011 at 10:21:52AM +0000, Lorenzo Pieralisi wrote:
> Hi Russell,
> 
> On Mon, 2011-02-07 at 15:02 +0000, Russell King - ARM Linux wrote:
> > On Mon, Feb 07, 2011 at 04:58:05PM +0200, saeed bishara wrote:
> > > 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.
> > 
> > We don't want to allocate this at boot time, because it will require
> > additional maintainence when L1 page tables are added for ioremap() etc.
> > 
> > I feel that it's best to leave it as-is, as this is the method everyone
> > has been using to date.  When it becomes a problem, we can then look at
> > resolving it.
> > 
> 
> For v7 MP cpuidle it is already critical, we do need to have a page
> table copy for the resume path to be MP safe.
> Maybe we can just provide an API to pass the page table pointer, then
> see how to allocate it and when.

As I already said - allocate a page table before hand and switch to it,
free it afterwards.  This code does not need to have the complexities
of page table allocation mixed into it.

> The same goes for the stack pointer global variable which should be
> per cpu.

Yes, but this is what is currently done, so at the present time I'm
just sorting out what's already in the kernel.  If we need further
changes, then that needs to be built on top of this.

> In which branch do these patches live in order to test them and 
> provide feedback ?

They're not published yet as I'm waiting for feedback on them, etc.
They're still receiving the odd tweak as comments are received.

Let's get this so that the current suspend/resume code can use it, and
has been tested with it, and then think about adding other uses to it.



More information about the linux-arm-kernel mailing list