arm64: mm: Make icache synchronisation logic huge page aware
authorSteve Capper <steve.capper@linaro.org>
Wed, 2 Jul 2014 10:46:23 +0000 (11:46 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Jul 2014 18:18:26 +0000 (11:18 -0700)
commitf0b43bec2d022381a70f63007b925efe0c3a9f03
tree047317845438e8516e90e18fd88fee6eaac9e9a7
parent1f8e5d4325ab2b4b328ca4eabcd2a687103d0565
arm64: mm: Make icache synchronisation logic huge page aware

commit 923b8f5044da753e4985ab15c1374ced2cdf616c upstream.

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: Mark Brown <broonie@linaro.org>
Tested-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Steve Capper <steve.capper@linaro.org>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/mm/flush.c