Re: [PATCH v2] powerpc32: memcpy/memset: only use dcbz once cache is enabled

2015-09-14 Thread Scott Wood
On Sat, 2015-09-12 at 11:57 +0200, christophe leroy wrote: > Le 11/09/2015 03:24, Michael Ellerman a écrit : > > On Thu, 2015-09-10 at 17:05 -0500, Scott Wood wrote: > > > > > > I don't think this duplication is what Michael meant by "the normal cpu > > > feature sections". What else is going to

Re: [PATCH v2] powerpc32: memcpy/memset: only use dcbz once cache is enabled

2015-09-14 Thread Michael Ellerman
On Sat, 2015-09-12 at 11:57 +0200, christophe leroy wrote: > > Le 11/09/2015 03:24, Michael Ellerman a écrit : > > On Thu, 2015-09-10 at 17:05 -0500, Scott Wood wrote: > >> > >> I don't think this duplication is what Michael meant by "the normal cpu > >> feature sections". What else is going to u

Re: [PATCH v2] powerpc32: memcpy/memset: only use dcbz once cache is enabled

2015-09-12 Thread christophe leroy
Le 11/09/2015 03:24, Michael Ellerman a écrit : On Thu, 2015-09-10 at 17:05 -0500, Scott Wood wrote: I don't think this duplication is what Michael meant by "the normal cpu feature sections". What else is going to use this very specific infrastructure? Yeah, sorry, I was hoping you could do

Re: [PATCH v2] powerpc32: memcpy/memset: only use dcbz once cache is enabled

2015-09-10 Thread Michael Ellerman
On Thu, 2015-09-10 at 17:05 -0500, Scott Wood wrote: > On Thu, 2015-09-10 at 08:41 +0200, Christophe Leroy wrote: > > > > +/* Cache related sections */ > > +#define BEGIN_CACHE_SECTION_NESTED(label)START_FTR_SECTION(label) > > +#define BEGIN_CACHE_SECTION START_FTR_SECTION(97

Re: [PATCH v2] powerpc32: memcpy/memset: only use dcbz once cache is enabled

2015-09-10 Thread Scott Wood
On Thu, 2015-09-10 at 08:41 +0200, Christophe Leroy wrote: > > +/* Cache related sections */ > +#define BEGIN_CACHE_SECTION_NESTED(label)START_FTR_SECTION(label) > +#define BEGIN_CACHE_SECTION START_FTR_SECTION(97) > + > +#define END_CACHE_SECTION_NESTED(msk, val, label)

[PATCH v2] powerpc32: memcpy/memset: only use dcbz once cache is enabled

2015-09-09 Thread Christophe Leroy
memcpy() and memset() uses instruction dcbz to speed up copy by not wasting time loading cache line with data that will be overwritten. Some platform like mpc52xx do no have cache active at startup and can therefore not use memcpy(). Allthough no part of the code explicitly uses memcpy(), GCC makes