Commit 923b8f50 authored by Steve Capper's avatar Steve Capper Committed by Catalin Marinas

arm64: mm: Make icache synchronisation logic huge page aware

The __sync_icache_dcache routine will only flush the dcache for the
first page of a compound page, potentially leading to stale icache
data residing further on in a hugetlb page.

This patch addresses this issue by taking into consideration the
order of the page when flushing the dcache.
Reported-by: default avatarMark Brown <>
Tested-by: default avatarMark Brown <>
Signed-off-by: default avatarSteve Capper <>
Acked-by: default avatarWill Deacon <>
Signed-off-by: default avatarCatalin Marinas <>
Cc: <> # v3.11+
parent f3b766a2
......@@ -79,7 +79,8 @@ void __sync_icache_dcache(pte_t pte, unsigned long addr)
if (!test_and_set_bit(PG_dcache_clean, &page->flags)) {
__flush_dcache_area(page_address(page), PAGE_SIZE);
PAGE_SIZE << compound_order(page));
} else if (icache_is_aivivt()) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment