svn commit: r291242 - head/sys/powerpc/include

Konstantin Belousov kostikbel at gmail.com
Tue Nov 24 09:21:17 UTC 2015


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.



More information about the svn-src-all mailing list