[3.13.y.z extended stable] Patch "arm64: mm: Make icache synchronisation logic huge page aware" has been added to staging queue

Kamal Mostafa kamal at canonical.com
Wed Aug 6 20:54:20 UTC 2014


This is a note to let you know that I have just added a patch titled

    arm64: mm: Make icache synchronisation logic huge page aware

to the linux-3.13.y-queue branch of the 3.13.y.z extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.13.y-queue

This patch is scheduled to be released in version 3.13.11.6.

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.13.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Kamal

------

>From 3862a3be5c37c75f03f776db0c134a71b0dc97a3 Mon Sep 17 00:00:00 2001
From: Steve Capper <steve.capper at linaro.org>
Date: Wed, 2 Jul 2014 11:46:23 +0100
Subject: 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 at linaro.org>
Tested-by: Mark Brown <broonie at linaro.org>
Signed-off-by: Steve Capper <steve.capper at linaro.org>
Acked-by: Will Deacon <will.deacon at arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas at arm.com>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
 arch/arm64/mm/flush.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/mm/flush.c b/arch/arm64/mm/flush.c
index e4193e3..0d64089 100644
--- a/arch/arm64/mm/flush.c
+++ b/arch/arm64/mm/flush.c
@@ -79,7 +79,8 @@ void __sync_icache_dcache(pte_t pte, unsigned long addr)
 		return;

 	if (!test_and_set_bit(PG_dcache_clean, &page->flags)) {
-		__flush_dcache_area(page_address(page), PAGE_SIZE);
+		__flush_dcache_area(page_address(page),
+				PAGE_SIZE << compound_order(page));
 		__flush_icache_all();
 	} else if (icache_is_aivivt()) {
 		__flush_icache_all();
--
1.9.1





More information about the kernel-team mailing list