[PATCH v3 2/2] arm64: Use PoU cache instr for I/D coherency

Catalin Marinas catalin.marinas at arm.com
Wed Dec 16 03:39:21 PST 2015


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 at arm.com>



More information about the linux-arm-kernel mailing list