From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: mm: Make icache synchronisation logic huge page aware
Date: Wed, 2 Jul 2014 11:50:14 +0100 [thread overview]
Message-ID: <20140702105013.GI18731@arm.com> (raw)
In-Reply-To: <1404297983-30840-1-git-send-email-steve.capper@linaro.org>
On Wed, Jul 02, 2014 at 11:46:23AM +0100, Steve Capper wrote:
> 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>
Will
> ---
> 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.3
>
>
prev parent reply other threads:[~2014-07-02 10:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-02 10:46 [PATCH] arm64: mm: Make icache synchronisation logic huge page aware Steve Capper
2014-07-02 10:50 ` Will Deacon [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140702105013.GI18731@arm.com \
--to=will.deacon@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.