All of lore.kernel.org
 help / color / mirror / Atom feed
From: santosh.shilimkar@ti.com (Santosh Shilimkar)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 3/3] ARM: mm: add l2x0 suspend/resume support
Date: Tue, 27 Sep 2011 16:27:32 +0530	[thread overview]
Message-ID: <4E81AC1C.4090405@ti.com> (raw)
In-Reply-To: <20110927102835.GA18572@e102568-lin.cambridge.arm.com>

On Tuesday 27 September 2011 03:58 PM, Lorenzo Pieralisi wrote:
> 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
> 
I read that.

> Having said that:
> 
> - This patch does not switch the MMU off
I noticed that. That comment was miss-placed.

> - This patch does not cover security, and I mentioned that
I never said it is covering security.
"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."

> - Russell referred to saving registers not restoring them, for a reason
I raised this point on very first patch for L2. My point here was all
the L2 registers cab be saved in init function and C-file.

> - 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.
> 
Again I never said that. I guess MX support it as well. But I don't know
whether they have secure limitations as well. If not then probably
this asm resume function can help.

> 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.
> 
I agree. From various discussion so far, apart MX, nobody complained
about C-version of the code. Hence the comment. If there are more
platforms which needs it, then the asm version would be useful and
should be preferred over C-version.

Regards
Santosh

  reply	other threads:[~2011-09-27 10:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-26 14:32 [RFC PATCH 0/3] ARM: mm: add L2 suspend/resume support Lorenzo Pieralisi
2011-09-26 14:32 ` [RFC PATCH 1/3] ARM: mm: add outercache resume hook Lorenzo Pieralisi
2011-09-26 14:32 ` [RFC PATCH 2/3] ARM: mm: add l2x0 physical address parameter to init Lorenzo Pieralisi
2011-09-26 14:51   ` Russell King - ARM Linux
2011-09-26 16:02     ` Lorenzo Pieralisi
2011-09-26 14:32 ` [RFC PATCH 3/3] ARM: mm: add l2x0 suspend/resume support Lorenzo Pieralisi
2011-09-26 14:55   ` Russell King - ARM Linux
2011-09-26 16:27     ` Lorenzo Pieralisi
2011-09-26 15:06   ` Russell King - ARM Linux
2011-09-26 17:14     ` Lorenzo Pieralisi
2011-09-27  5:29       ` Santosh Shilimkar
2011-09-27 10:28         ` Lorenzo Pieralisi
2011-09-27 10:57           ` Santosh Shilimkar [this message]
2011-09-28 19:24             ` Russell King - ARM Linux
2011-09-29  5:38               ` Santosh Shilimkar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E81AC1C.4090405@ti.com \
    --to=santosh.shilimkar@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.