From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: suspend: use flush range instead of flush all
Date: Thu, 13 Sep 2012 09:52:06 +0100 [thread overview]
Message-ID: <20120913085206.GA13739@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <CAG9bXv=UzR1iDJ_+6JAC5Ue2caZs7JvGOMjABidsbgRKNhxJrA@mail.gmail.com>
On Thu, Sep 13, 2012 at 10:20:30AM +0800, Raul Xiong wrote:
> I have several questions:
> 1. Even we call flush_calche_all in __cpu_suspend_save, since later we
> will outer_clean_range which may cause cache operations so we still
> need to flush again in finisher, right?
Why would it? Any data which would be pulled back into the L1 cache
from that point is either going to be clean (in other words, a copy of
it exists elsewhere in the system) or it is going to be dirty (in
which case, it's been explicitly written to - and that's the stuff the
finisher needs to take care of.
We do not care abou the dirty data created by calling subsequent
functions as this is not used for resuming.
> 2. Not every platform the L1 will be lost, we have the option to keep
> L1 retentive, right? Just consider single core CA9. So we may not need
> to flush all every time.
That's where you start paying the price for having such a complex
architecture, and the need to have generic code to keep things simple.
Rather than thinking "we need to eliminate that flush and move it into
the finisher" start thinking "we need to communicate what parts of the
system are lost over suspend and get the suspend code to use that to
determine what it needs to do".
> 3. Why it's difficult to call cache maintenance in assembly? Moreover,
> not every finisher is assembly, right?
Have you tried to see whether a function called 'flush_cache_all'
actually exists in your System.map file? It doesn't. What you have
is a bunch of cache specific functions, one of which either gets aliased
to that name at build time, or that name gets aliased to a function
pointer (in a structure) to point at the relevant cache specific
function. And there are platforms where hard-coding just one is not
correct.
What we have today is a massive improvement over what we had earlier on
where every platform was implementing all the suspend/resume stuff
themselves. I'm not going back to the situation where we have that
again.
next prev parent reply other threads:[~2012-09-13 8:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1347434328-7207-1-git-send-email-wzch@marvell.com>
2012-09-12 7:43 ` [PATCH] ARM: suspend: use flush range instead of flush all Shilimkar, Santosh
2012-09-12 8:54 ` Russell King - ARM Linux
2012-09-12 9:10 ` Shilimkar, Santosh
2012-09-12 9:46 ` Russell King - ARM Linux
2012-09-12 9:57 ` Shilimkar, Santosh
2012-09-13 2:20 ` Raul Xiong
2012-09-13 8:52 ` Russell King - ARM Linux [this message]
2012-09-12 8:58 ` Lorenzo Pieralisi
2012-09-12 9:20 ` Shilimkar, Santosh
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=20120913085206.GA13739@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).