sh: Drop associative writes for SH-4 cache flushes.
authorMatt Fleming <matt@console-pimps.org>
Fri, 4 Dec 2009 07:18:11 +0000 (16:18 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Fri, 4 Dec 2009 07:18:11 +0000 (16:18 +0900)
commita781d1e5ff6277f80ff3c9503775521bc64cf131
treece6c6222f86be3bd9bf409b9852a527fdf4b8a14
parent7e01c949989b984c074469e04ab99c47367c7187
sh: Drop associative writes for SH-4 cache flushes.

When flushing/invalidating the icache/dcache via the memory-mapped IC/OC
address arrays, the associative bit should only be used in conjunction with
virtual addresses. However, we currently flush cache lines based on physical
address, so stop using the associative bit.

It is a better strategy to use non-associative writes (and physical tags) for
flushing the caches anyway, because flushing by virtual address (as with the
A-bit set) requires a valid TLB entry for that virtual address. If one does not
exist in the TLB no exception is generated and the flush is silently ignored.

This is also future-proofing for SH-4A parts which are gradually phasing out
associative writes to the cache array due to the aforementioned case of certain
flushes silently turning in to nops.

Signed-off-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/mm/cache-sh4.c