Summary: | non-portable x86/x86_64 inline assembly | ||
---|---|---|---|
Product: | Spice | Reporter: | Timo Teräs <timo.teras> |
Component: | protocol | Assignee: | Spice Bug List <spice-bugs> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | freedesktop |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | Use gcc builtin rather than asm for memory barriers |
Description
Timo Teräs
2014-12-04 09:18:39 UTC
Seems that memory barrier is the only thing needed. Consider using compiler built-ins when possible. See: http://en.wikipedia.org/wiki/Memory_ordering#Compiler_support_for_hardware_memory_barriers So with gcc>=4.4 __sync_synchronize() would be preferred. Created attachment 110448 [details] [review] Use gcc builtin rather than asm for memory barriers I actually have that patch in my local spice-protocol copy which I never really tested... (In reply to Christophe Fergeau from comment #2) > Created attachment 110448 [details] [review] [review] > Use gcc builtin rather than asm for memory barriers > > I actually have that patch in my local spice-protocol copy which I never > really tested... my understanding is that this is correct, I think we should try that in the coming upstream release. (if not there are a lot of mb defines in kernel arch/*/include/asm/barrier.h) (there are possibly better version of the ring, apparently adapted from Tim Deegan and Andrew Warfield) We already use __sync_synchronize. Probably the bug was not closed. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.