[RFC PATCH 3/3] ARM: mm: add l2x0 suspend/resume support

Lorenzo Pieralisi lorenzo.pieralisi at arm.com
Tue Sep 27 06:28:35 EDT 2011


Santosh,

On Tue, Sep 27, 2011 at 06:29:38AM +0100, Santosh Shilimkar wrote:
> Lorenzo,
> 
> On Monday 26 September 2011 10:44 PM, Lorenzo Pieralisi wrote:
> > On Mon, Sep 26, 2011 at 04:06:45PM +0100, Russell King - ARM Linux wrote:
> >> On Mon, Sep 26, 2011 at 03:32:41PM +0100, Lorenzo Pieralisi wrote:
> >>> Context is saved once for all at boot time, along with the L2 physical address
> >>> and cache type.
> >>
> >> Why is this assembly code?  As Barry's previous patch shows, it's
> >> entirely possible to save all the state required at init time from
> >> the existing C code without needing any additional functions.
> >>
> > 
> I too didn't like this approach.
> 
> The platforms which needs to take care of security needs to take
> care of the L2 on their own and this code doesn't help them.
> 
> Other platform which wants to use the L2 code, looks like are
> fine to use the C-version which saves registers in init and restores
> it in resume path whenever needed. The patch which was posted
> on that was good enough. Regarding turning OFF MMU is really
> not necessary unless and until some hardware's are buggy. In that
> case, instead of adding that un-necessary code in generic code,
> it's better to patch only that buggy SOC code.
> 

I summed up the reasons for this patch to exist in the cover letter 
and I mentioned that some bits can be merged IF needed:

http://www.spinics.net/lists/arm-kernel/msg141989.html

Having said that:

- This patch does not switch the MMU off
- This patch does not cover security, and I mentioned that
- Russell referred to saving registers not restoring them, for a reason
- If the resume hook is written in C you cannot call it when the MMU is
  off, which we need if L2 is retained. Unless you think OMAP is the
  only platform supporting L2 RAM retention, but there are people who might
  disagree.

And if you think it is not worth merging since most SoCs will run in
non-secure mode, then that's a very valid point, but it is true for both
patch series, not just for this one.

Lorenzo




More information about the linux-arm-kernel mailing list