[RFC PATCH 1/2] arm64: Defer dcache flush in __cpu_copy_user_page

Catalin Marinas catalin.marinas at arm.com
Mon Dec 14 07:18:13 PST 2015


On Mon, Dec 14, 2015 at 05:27:43AM -0800, Ashok Kumar wrote:
> Defer dcache flushing to __sync_icache_dcache by calling
> flush_dcache_page which clears PG_dcache_clean flag.
> 
> Signed-off-by: Ashok Kumar <ashoks at broadcom.com>
> ---
>  arch/arm64/mm/copypage.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/mm/copypage.c b/arch/arm64/mm/copypage.c
> index 13bbc3be..22e4cb4 100644
> --- a/arch/arm64/mm/copypage.c
> +++ b/arch/arm64/mm/copypage.c
> @@ -24,8 +24,9 @@
>  
>  void __cpu_copy_user_page(void *kto, const void *kfrom, unsigned long vaddr)
>  {
> +	struct page *page = virt_to_page(kto);
>  	copy_page(kto, kfrom);
> -	__flush_dcache_area(kto, PAGE_SIZE);
> +	flush_dcache_page(page);
>  }
>  EXPORT_SYMBOL_GPL(__cpu_copy_user_page);

Acked-by: Catalin Marinas <catalin.marinas at arm.com>

-- 
Catalin



More information about the linux-arm-kernel mailing list