[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 7 Jul 2018 19:51:09 +0800
From: Guo Ren <ren_guo@...ky.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org,
tglx@...utronix.de, daniel.lezcano@...aro.org,
jason@...edaemon.net, arnd@...db.de, c-sky_gcc_upstream@...ky.com,
gnu-csky@...tor.com, thomas.petazzoni@...tlin.com,
wbx@...ibc-ng.org, green.hu@...il.com,
Will Deacon <will.deacon@....com>
Subject: Re: [PATCH V2 06/19] csky: Cache and TLB routines
On Thu, Jul 05, 2018 at 07:40:25PM +0200, Peter Zijlstra wrote:
> > +#ifdef CONFIG_SMP
> > +#define mb() asm volatile ("sync.is":::"memory")
> > +#else
> > +#define mb() asm volatile ("sync":::"memory")
> > +#endif
>
> This is very suspect, please elaborate.
>
> What I would've expected is:
>
> #define mb() asm volatile ("sync" ::: "memory")
>
> #ifdef CONFIG_SMP
> #define __smp_mb() asm volatile ("sync.is" ::: "memory")
> #endif
>
> Is that in fact what you meant?
>
> Do you have a reference to your architecture manual and memory model
> description somewhere?
I'll fixup it in next version patch.
Powered by blists - more mailing lists