linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: catalin.marinas@arm.com (Catalin Marinas)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 2/2] arm64: Use PoU cache instr for I/D coherency
Date: Wed, 16 Dec 2015 11:39:21 +0000	[thread overview]
Message-ID: <20151216113920.GC2765@mbp> (raw)
In-Reply-To: <1450260690-5431-3-git-send-email-ashoks@broadcom.com>

On Wed, Dec 16, 2015 at 02:11:30AM -0800, Ashok Kumar wrote:
> @@ -74,13 +79,11 @@ void __sync_icache_dcache(pte_t pte, unsigned long addr)
>  	if (!page_mapping(page))
>  		return;
>  
> -	if (!test_and_set_bit(PG_dcache_clean, &page->flags)) {
> -		__flush_dcache_area(page_address(page),
> -				PAGE_SIZE << compound_order(page));
> +	if (!test_and_set_bit(PG_dcache_clean, &page->flags))
> +		sync_icache_aliases(page_address(page),
> +				    PAGE_SIZE << compound_order(page));
> +	else if (icache_is_aivivt())
>  		__flush_icache_all();
> -	} else if (icache_is_aivivt()) {
> -		__flush_icache_all();
> -	}
>  }

You changed the original code path slightly here. We had a
__flush_icache_all() even for non-aliasing VIPT but it now does the
I-cache invalidation per page. It may be an improvement, I can't tell
without benchmarks but you should at least mention this in the commit
log so that we remember in the future. Apart from this:

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>

  reply	other threads:[~2015-12-16 11:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-16 10:11 [PATCH v3 0/2] arm64: change PoC D-cache flush to PoU Ashok Kumar
2015-12-16 10:11 ` [PATCH v3 1/2] arm64: Defer dcache flush in __cpu_copy_user_page Ashok Kumar
2015-12-16 10:11 ` [PATCH v3 2/2] arm64: Use PoU cache instr for I/D coherency Ashok Kumar
2015-12-16 11:39   ` Catalin Marinas [this message]
2015-12-16 12:18   ` Will Deacon

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=20151216113920.GC2765@mbp \
    --to=catalin.marinas@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).