]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ARM: DMA: ensure that old section mappings are flushed from the TLB
authorRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 17 Jul 2014 11:17:45 +0000 (12:17 +0100)
committerJiri Slaby <jslaby@suse.cz>
Sun, 8 Feb 2015 19:02:04 +0000 (20:02 +0100)
commit51173bf8141d0dc740689b99ce88721e568eec39
treec54d3ef5fb327d16e79b4ecb51573e5766b5d957
parentd5ce89479359ee5ad97c40947ee71123b136db26
ARM: DMA: ensure that old section mappings are flushed from the TLB

commit 6b076991dca9817e75c37e2f0db6d52611ea42fa upstream.

When setting up the CMA region, we must ensure that the old section
mappings are flushed from the TLB before replacing them with page
tables, otherwise we can suffer from mismatched aliases if the CPU
speculatively prefetches from these mappings at an inopportune time.

A mismatched alias can occur when the TLB contains a section mapping,
but a subsequent prefetch causes it to load a page table mapping,
resulting in the possibility of the TLB containing two matching
mappings for the same virtual address region.

Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Hou Pengyang <houpengyang@huawei.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
arch/arm/mm/dma-mapping.c