[PATCH] ARM: setup_mm_for_reboot(): use flush_cache_louis()

Russell King - ARM Linux linux at arm.linux.org.uk
Tue Nov 6 17:04:58 EST 2012


On Tue, Nov 06, 2012 at 04:12:27PM -0500, Nicolas Pitre wrote:
> 
> ... instead of flush_cache_all().  The later unconditionally flushes
> the L2 cache on ARMv7 architectures such as Cortex A15 and A7 which
> is costly and unnecessary in some scenarios where setup_mm_for_reboot()
> is used.  If L2 has to be flushed as well, it should already be done
> separately on other architectures anyway.

Why does the cost at reboot count?  It's a relatively slow operation as
it is anyway, because you have to wait for the system to shut down, call
the boot loader, etc.

However, the opposite argument is that the state of the L2 _shouldn't_
matter - except for one small little detail.  Dirty data, which could
get evicted and overwrite something that matters.  Generally there won't
be any dirty data in the L2 cache on normal boot, so this is a situation
which boot loaders probably don't expect.

So all in all, I'm not sure of the wiseness of your change.  It's likely
to cause regressions.



More information about the linux-arm-kernel mailing list