Date: Tue, 24 Nov 2015 11:21:11 +0200 From: Konstantin Belousov <kostikbel@gmail.com> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r291242 - head/sys/powerpc/include Message-ID: <20151124092111.GF58629@kib.kiev.ua> In-Reply-To: <201511240913.tAO9DLUC032185@repo.freebsd.org> References: <201511240913.tAO9DLUC032185@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Nov 24, 2015 at 09:13:21AM +0000, Konstantin Belousov wrote: > Author: kib > Date: Tue Nov 24 09:13:21 2015 > New Revision: 291242 > URL: https://svnweb.freebsd.org/changeset/base/291242 > > Log: > On PowerPC 64bit, the linux-compat mb() definition is implemented with > lwsync instruction, which does not provide Store/Load barrier. Fix > this by using "full" sync barrier for mb(). > > atomic_store_rel() does not need full barrier, change mb() call there > to the lwsync instruction if not hitting the known CPU erratas > (i.e. on 32bit). Provide powerpc_lwsync() helper to isolate the > lwsync/sync compile time selection, and use it in atomic_store_rel() > and several other places which duplicate the code. Note that powerpc/aim/slb.c issues mb() also intending to generate lwsync. This will be fixed to use powerpc_lwsync() in the separate commit.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20151124092111.GF58629>