lkml.org 
[lkml]   [2015]   [Sep]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH] powerpc32: memcpy: only use dcbz once cache is enabled
Date
From: Christophe Leroy
> Sent: 07 September 2015 15:25
...
> diff --git a/arch/powerpc/lib/copy_32.S b/arch/powerpc/lib/copy_32.S
> index 2ef50c6..05b3096 100644
> --- a/arch/powerpc/lib/copy_32.S
> +++ b/arch/powerpc/lib/copy_32.S
> @@ -172,7 +172,16 @@ _GLOBAL(memcpy)
> mtctr r0
> beq 63f
> 53:
> - dcbz r11,r6
> + /*
> + * During early init, cache might not be active yet, so dcbz cannot be
> + * used. We put dcbt instead of dcbz. If cache is not active, it's just
> + * like a not. If cache is active, at least it prefetchs the line to be
^^^ nop ??

David

> + * overwritten.
> + * Will be replaced by dcbz in machine_init()
> + */
> +_GLOBAL(ppc32_memcpy_dcbz)
> + dcbt r11,r6
> +
> COPY_16_BYTES
> #if L1_CACHE_BYTES >= 32
> COPY_16_BYTES
> --
> 2.1.0

\
 
 \ /
  Last update: 2015-09-07 17:41    [W:0.047 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site