[PATCH v2] ARM: cache-l2x0: add resume entry for l2 in secure mode

Shawn Guo shawn.guo at freescale.com
Thu Sep 29 08:44:20 EDT 2011


On Thu, Sep 29, 2011 at 10:24:06AM +0100, Russell King - ARM Linux wrote:
> On Thu, Sep 29, 2011 at 05:28:29PM +0800, Shawn Guo wrote:
> > On Sun, Sep 25, 2011 at 08:26:09PM -0700, Barry Song wrote:
> > > we save the l2x0 registers at the first initialization, and platform codes
> > > can get them to restore l2x0 status after wakeup.
> > > 
> > > Cc: Shawn Guo <shawn.guo at linaro.org>
> > > Cc: Lorenzo Pieralisi <lorenzo.pieralisi at arm.com>
> > > Signed-off-by: Barry Song <Baohua.Song at csr.com>
> > > ---
> > >  -v2:
> > >  define the structure l2x0_regs to hold all saved registers;
> > >  make saved copy of registers non-static so that platform codes can access them;
> > >  add asm_offset for l2x0 saved regs(l2x0_regs struct) so that asm codes can use
> > > 
> > 
> > I'm trying to migrate imx6q to this infrastructure, but seeing some
> > facts that might stop me from the effort.  Please help me understand
> > these facts are correct.
> > 
> > It seems to me that the only benefit that imx6q gains from the
> > infrastructure is the register saving, and I fail to see any benefit
> > on the restoring.
> 
> That's correct - because I believe that's the only part which is worth
> doing in common code.  The restoring tends to be platform dependent so
> I don't see the point of having a bunch of code in common files to do
> that which almost no one uses.
> 
> >  * I still have to save physical base of l2x0 for register restoring.
> 
> That could be added to the structure.
> 
> >  * I do not have the physical address of l2x0_saved_regs, and I have
> >    to manage to get it somehow.
> 
> That's true no matter what - we could store the physical address of
> the struct somewhere, but then in order for you to obtain that, you'd
> somehow need to know the physical address of _that_ location too - so
> there's no benefit there.
> 
> It can be obtained simply by: __pa(l2x0_saved_regs) in C code, and
> saving that in a location known to the platform prior to suspend.
> 
Yeah, that's why I want to get imx6q stay away from this infrastructure
right now.  I do not see any simplicity and cleanup on imx6q current
code by migrating to this infrastructure.

-- 
Regards,
Shawn




More information about the linux-arm-kernel mailing list