Messages in this thread | | | Date | Fri, 5 Apr 2013 09:57:13 +0530 | From | Vineet Gupta <> | Subject | Re: [RFC] Add implicit barriers to irqsave/restore class of functions |
| |
Hi Peter,
On 04/04/2013 09:43 PM, Peter Zijlstra wrote: > - : "cc"); > + : "memory", "cc"); > That's not a memory barrier, that a memory clobber, aka a compiler > barrier.
For the problem under consideration we indeed want a compiler barrier because the error shows up due to a stale register which is live across a spinlock for !PREEMPT_COUNT config.
However IMO doing this in irq save/restore macros is semantically incorrect since those macros might be used elsewhere which don't need the compiler reload reg semantics. Further per tglx' suggestion fixing preempt_* macros for !PREEMPT_COUNT case would fix this independent of what arch is doing.
A patch to that effect was already posted to lists: http://www.spinics.net/lists/kernel/msg1510885.html Please let us know what you think.
Thx, -Vineet
| |