Skip to content

Commit 00a19f3

Browse files
vwaxRussell King
authored and
Russell King
committed
ARM: 8627/1: avoid cache flushing in flush_dcache_page()
When the data cache is PIPT or VIPT non-aliasing, and cache operations are broadcast by the hardware, we can always postpone the flush in flush_dcache_page(). A similar change was done for ARM64 in commit b5b6c9e ("arm64: Avoid cache flushing in flush_dcache_page()"). Reviewed-by: Catalin Marinas <[email protected]> Signed-off-by: Rabin Vincent <[email protected]> Signed-off-by: Russell King <[email protected]>
1 parent 7ce7d89 commit 00a19f3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

arch/arm/mm/flush.c

+6
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,12 @@ void flush_dcache_page(struct page *page)
327327
if (page == ZERO_PAGE(0))
328328
return;
329329

330+
if (!cache_ops_need_broadcast() && cache_is_vipt_nonaliasing()) {
331+
if (test_bit(PG_dcache_clean, &page->flags))
332+
clear_bit(PG_dcache_clean, &page->flags);
333+
return;
334+
}
335+
330336
mapping = page_mapping(page);
331337

332338
if (!cache_ops_need_broadcast() &&

0 commit comments

Comments
 (0)