Re: [PATCH v2] powerpc: slightly improve cache helpers

2019-07-29 Thread Nick Desaulniers
On Thu, Jul 25, 2019 at 2:30 PM Nick Desaulniers wrote: > > On Mon, Jul 22, 2019 at 10:58 AM Segher Boessenkool > wrote: > > > > On Mon, Jul 22, 2019 at 10:21:07AM -0700, Nick Desaulniers wrote: > > > On Sun, Jul 21, 2019 at 11:19 PM Segher Boessenkool > > > wrote: > > > > On Sun, Jul 21, 2019 a

Re: [PATCH v2] powerpc: slightly improve cache helpers

2019-07-25 Thread Nick Desaulniers
On Mon, Jul 22, 2019 at 10:58 AM Segher Boessenkool wrote: > > On Mon, Jul 22, 2019 at 10:21:07AM -0700, Nick Desaulniers wrote: > > On Sun, Jul 21, 2019 at 11:19 PM Segher Boessenkool > > wrote: > > > On Sun, Jul 21, 2019 at 07:41:40PM -0700, Nathan Chancellor wrote: > > > > On Sun, Jul 21, 2019

Re: [PATCH v2] powerpc: slightly improve cache helpers

2019-07-25 Thread Segher Boessenkool
On Tue, Jul 23, 2019 at 09:21:53AM +1000, Michael Ellerman wrote: > Segher Boessenkool writes: > >> can use both RA and RB to compute the address, rather than us forcing RA > >> to 0. > >> > >> But at least with my compiler here (GCC 8 vintage) I don't actually see > >> GCC ever using both GPRs e

Re: [PATCH v2] powerpc: slightly improve cache helpers

2019-07-22 Thread Michael Ellerman
Segher Boessenkool writes: > On Mon, Jul 22, 2019 at 08:15:14PM +1000, Michael Ellerman wrote: >> Segher Boessenkool writes: >> > On Sun, Jul 21, 2019 at 12:58:46AM -0700, Nathan Chancellor wrote: >> >> 017c clear_user_page: >> >> 17c: 94 21 ff f0 stwu 1, -16(1) >> >>

Re: [PATCH v2] powerpc: slightly improve cache helpers

2019-07-22 Thread Segher Boessenkool
On Mon, Jul 22, 2019 at 10:21:07AM -0700, Nick Desaulniers wrote: > On Sun, Jul 21, 2019 at 11:19 PM Segher Boessenkool > wrote: > > On Sun, Jul 21, 2019 at 07:41:40PM -0700, Nathan Chancellor wrote: > > > On Sun, Jul 21, 2019 at 01:01:50PM -0500, Segher Boessenkool wrote: > > > > On Sun, Jul 21,

Re: [PATCH v2] powerpc: slightly improve cache helpers

2019-07-22 Thread Nick Desaulniers
On Sun, Jul 21, 2019 at 11:19 PM Segher Boessenkool wrote: > > On Sun, Jul 21, 2019 at 07:41:40PM -0700, Nathan Chancellor wrote: > > Hi Segher, > > > > On Sun, Jul 21, 2019 at 01:01:50PM -0500, Segher Boessenkool wrote: > > > On Sun, Jul 21, 2019 at 12:58:46AM -0700, Nathan Chancellor wrote: > >

Re: [PATCH v2] powerpc: slightly improve cache helpers

2019-07-22 Thread Segher Boessenkool
On Mon, Jul 22, 2019 at 08:15:14PM +1000, Michael Ellerman wrote: > Segher Boessenkool writes: > > On Sun, Jul 21, 2019 at 12:58:46AM -0700, Nathan Chancellor wrote: > >> 017c clear_user_page: > >> 17c: 94 21 ff f0 stwu 1, -16(1) > >> 180: 38 80 00 80

Re: [PATCH v2] powerpc: slightly improve cache helpers

2019-07-22 Thread Michael Ellerman
Segher Boessenkool writes: > On Sun, Jul 21, 2019 at 12:58:46AM -0700, Nathan Chancellor wrote: >> I have attached the disassembly of arch/powerpc/kernel/mem.o with >> clear_page (working) and broken_clear_page (broken), along with the side >> by side diff. My assembly knowledge is fairly limited

Re: [PATCH v2] powerpc: slightly improve cache helpers

2019-07-21 Thread Segher Boessenkool
On Sun, Jul 21, 2019 at 07:41:40PM -0700, Nathan Chancellor wrote: > Hi Segher, > > On Sun, Jul 21, 2019 at 01:01:50PM -0500, Segher Boessenkool wrote: > > On Sun, Jul 21, 2019 at 12:58:46AM -0700, Nathan Chancellor wrote: > > > 017c clear_user_page: > > > 17c: 94 21 ff f0

Re: [PATCH v2] powerpc: slightly improve cache helpers

2019-07-21 Thread Nathan Chancellor
Hi Segher, On Sun, Jul 21, 2019 at 01:01:50PM -0500, Segher Boessenkool wrote: > On Sun, Jul 21, 2019 at 12:58:46AM -0700, Nathan Chancellor wrote: > > I have attached the disassembly of arch/powerpc/kernel/mem.o with > > clear_page (working) and broken_clear_page (broken), along with the side > >

Re: [PATCH v2] powerpc: slightly improve cache helpers

2019-07-21 Thread Segher Boessenkool
On Sun, Jul 21, 2019 at 12:58:46AM -0700, Nathan Chancellor wrote: > I have attached the disassembly of arch/powerpc/kernel/mem.o with > clear_page (working) and broken_clear_page (broken), along with the side > by side diff. My assembly knowledge is fairly limited as it stands and > it is certainl

Re: [PATCH v2] powerpc: slightly improve cache helpers

2019-07-21 Thread Nathan Chancellor
On Fri, Jul 19, 2019 at 09:04:55AM -0700, Nathan Chancellor wrote: > On Fri, Jul 19, 2019 at 10:23:03AM -0500, Segher Boessenkool wrote: > > On Thu, Jul 18, 2019 at 08:24:56PM -0700, Nathan Chancellor wrote: > > > On Mon, Jul 08, 2019 at 11:49:52PM -0700, Nathan Chancellor wrote: > > > > On Tue, Ju

Re: [PATCH v2] powerpc: slightly improve cache helpers

2019-07-19 Thread Nathan Chancellor
On Fri, Jul 19, 2019 at 10:23:03AM -0500, Segher Boessenkool wrote: > On Thu, Jul 18, 2019 at 08:24:56PM -0700, Nathan Chancellor wrote: > > On Mon, Jul 08, 2019 at 11:49:52PM -0700, Nathan Chancellor wrote: > > > On Tue, Jul 09, 2019 at 07:04:43AM +0200, Christophe Leroy wrote: > > > > Is that a C

Re: [PATCH v2] powerpc: slightly improve cache helpers

2019-07-19 Thread Segher Boessenkool
On Thu, Jul 18, 2019 at 08:24:56PM -0700, Nathan Chancellor wrote: > On Mon, Jul 08, 2019 at 11:49:52PM -0700, Nathan Chancellor wrote: > > On Tue, Jul 09, 2019 at 07:04:43AM +0200, Christophe Leroy wrote: > > > Is that a Clang bug ? > > > > No idea, it happens with clang-8 and clang-9 though (pre

Re: [PATCH v2] powerpc: slightly improve cache helpers

2019-07-18 Thread Nathan Chancellor
On Mon, Jul 08, 2019 at 11:49:52PM -0700, Nathan Chancellor wrote: > On Tue, Jul 09, 2019 at 07:04:43AM +0200, Christophe Leroy wrote: > > Is that a Clang bug ? > > No idea, it happens with clang-8 and clang-9 though (pretty sure there > were fixes for PowerPC in clang-8 so something before it pro

Re: [PATCH v2] powerpc: slightly improve cache helpers

2019-07-09 Thread Segher Boessenkool
On Tue, Jul 09, 2019 at 07:04:43AM +0200, Christophe Leroy wrote: > Le 08/07/2019 à 21:14, Nathan Chancellor a écrit : > >On Mon, Jul 08, 2019 at 11:19:30AM +1000, Michael Ellerman wrote: > >>On Fri, 2019-05-10 at 09:24:48 UTC, Christophe Leroy wrote: > >>>Cache instructions (dcbz, dcbi, dcbf and d

Re: [PATCH v2] powerpc: slightly improve cache helpers

2019-07-08 Thread Nathan Chancellor
On Tue, Jul 09, 2019 at 07:04:43AM +0200, Christophe Leroy wrote: > > > Le 08/07/2019 à 21:14, Nathan Chancellor a écrit : > > On Mon, Jul 08, 2019 at 11:19:30AM +1000, Michael Ellerman wrote: > > > On Fri, 2019-05-10 at 09:24:48 UTC, Christophe Leroy wrote: > > > > Cache instructions (dcbz, dcbi

Re: [PATCH v2] powerpc: slightly improve cache helpers

2019-07-08 Thread Christophe Leroy
Le 08/07/2019 à 21:14, Nathan Chancellor a écrit : On Mon, Jul 08, 2019 at 11:19:30AM +1000, Michael Ellerman wrote: On Fri, 2019-05-10 at 09:24:48 UTC, Christophe Leroy wrote: Cache instructions (dcbz, dcbi, dcbf and dcbst) take two registers that are summed to obtain the target address. Us

Re: [PATCH v2] powerpc: slightly improve cache helpers

2019-07-08 Thread Nathan Chancellor
On Mon, Jul 08, 2019 at 11:19:30AM +1000, Michael Ellerman wrote: > On Fri, 2019-05-10 at 09:24:48 UTC, Christophe Leroy wrote: > > Cache instructions (dcbz, dcbi, dcbf and dcbst) take two registers > > that are summed to obtain the target address. Using 'Z' constraint > > and '%y0' argument gives

Re: [PATCH v2] powerpc: slightly improve cache helpers

2019-07-07 Thread Michael Ellerman
On Fri, 2019-05-10 at 09:24:48 UTC, Christophe Leroy wrote: > Cache instructions (dcbz, dcbi, dcbf and dcbst) take two registers > that are summed to obtain the target address. Using 'Z' constraint > and '%y0' argument gives GCC the opportunity to use both registers > instead of only one with the s