Thread (39 messages) 39 messages, 9 authors, 2012-12-28
STALE4901d

[RFC PATCH v2 3/5] ARM: kernel: update cpu_suspend code to use cache LoUIS operations

From: Lorenzo Pieralisi <hidden>
Date: 2012-09-20 10:25:14
Also in: linux-omap

On Wed, Sep 19, 2012 at 02:46:58PM +0100, Dave Martin wrote:
On Tue, Sep 18, 2012 at 05:35:33PM +0100, Lorenzo Pieralisi wrote:
quoted
In processors like A15/A7 L2 cache is unified and integrated within the
processor cache hierarchy, so that it is not considered an outer cache
anymore. For processors like A15/A7 flush_cache_all() ends up cleaning
all cache levels up to Level of Coherency (LoC) that includes
the L2 unified cache.

When a single CPU is suspended (CPU idle) a complete L2 clean is not
required, so generic cpu_suspend code must clean the data cache using the
newly introduced cache LoUIS function.
For patches 3-5 in this series, we know that the assumption that
flushing LoUIS is sufficient for safely powering the CPU down is not
valid in the general case, though we've agreed it's a sensible
compromise for the CPU variants we know about today.
I agree, but we should also keep in mind that there are suspend and
hotplug finishers where platform specific code can (and should sometimes)
carry out the required operations, if flushing to LoUIS is not sufficient.

Patch 3-5 are there to avoid carrying out heavy cache operations that
are not needed, not to define LoUIS as a sufficient cache level for
powering down a CPU.

Your concern is shared, though.
I think we do need to document this assumption, though.

At this point I don't mind whether it appears in code comments or in the
commit messages.
It is a fair point. I will improve comments in the code and commit logs
for next version.

Lorenzo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help