Re: [PATCH] powerpc: Ensure gcc doesn't move around cache flushing in __patch_instruction

2019-01-31 Thread Christophe Leroy
Le 18/05/2018 à 01:00, Segher Boessenkool a écrit : On Fri, May 18, 2018 at 08:30:27AM +1000, Benjamin Herrenschmidt wrote: On Thu, 2018-05-17 at 14:23 -0500, Segher Boessenkool wrote: On Thu, May 17, 2018 at 01:06:10PM +1000, Benjamin Herrenschmidt wrote: The current asm statement in

Re: [PATCH] powerpc: Ensure gcc doesn't move around cache flushing in __patch_instruction

2018-05-17 Thread Segher Boessenkool
On Fri, May 18, 2018 at 08:30:27AM +1000, Benjamin Herrenschmidt wrote: > On Thu, 2018-05-17 at 14:23 -0500, Segher Boessenkool wrote: > > On Thu, May 17, 2018 at 01:06:10PM +1000, Benjamin Herrenschmidt wrote: > > > The current asm statement in __patch_instruction() for the cache flushes > > >

Re: [PATCH] powerpc: Ensure gcc doesn't move around cache flushing in __patch_instruction

2018-05-17 Thread Benjamin Herrenschmidt
On Thu, 2018-05-17 at 14:23 -0500, Segher Boessenkool wrote: > Hi! > > On Thu, May 17, 2018 at 01:06:10PM +1000, Benjamin Herrenschmidt wrote: > > The current asm statement in __patch_instruction() for the cache flushes > > doesn't have a "volatile" statement and no memory clobber. That means > >

Re: [PATCH] powerpc: Ensure gcc doesn't move around cache flushing in __patch_instruction

2018-05-17 Thread Segher Boessenkool
Hi! On Thu, May 17, 2018 at 01:06:10PM +1000, Benjamin Herrenschmidt wrote: > The current asm statement in __patch_instruction() for the cache flushes > doesn't have a "volatile" statement and no memory clobber. That means > gcc can potentially move it around (or move the store done by put_user >