Re: [PATCH] spice-ppc: adds powerpc64 mem barriers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Il 08/08/2012 14:52, Erlon Cruz ha scritto:
>>> >> +#elif defined __PPC64__
>>> >> +#define spice_mb()   __asm__ __volatile__ ("sync" : : : "memory")
>> >
>> > Do we need a full sync here? Would an lwsync be enough?
>> > Without this, what happens? Is compilation broken? Are things buggy?
> Hi Christophe,
> 
> I'm not shure about what would happen. I grab this from the kernel
> definition of mb(). Kernel have to deal with device mem ops.  It guess
> lwsync, can be used once in this case only system memory is involved.

lwsync is a read memory barrier; writes can still be reordered with reads.

eieio is a write memory barrier if you do not care about write-combining
memory (usually you don't in userspace); writes can still be reordered
with reads.

sync is a full memory barrier.

Paolo
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]