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

Re: [Xen-devel] [PATCH] x86: simplify non-atomic bitops

>>> On 19.01.15 at 18:21, <andrew.cooper3@xxxxxxxxxx> wrote:
> On 19/01/15 15:52, Jan Beulich wrote:
>> - being non-atomic, their pointer arguments shouldn't be volatile-
>>   qualified
>> - their (half fake) memory operands can be a single "+m" instead of
>>   being both an output and an input
>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> There is a note at the top of the file describing why "+m" is
> specifically not used.  I have not looked into the reason yet, but a
> patch like this at leasts needs an adjustment to the comment if you
> believe it to be safe.

You mean this: "We don't use "+m" because the gcc manual says
that it should be used only when the constraint allows the operand
to reside in a register"? It looks wrong anyway, and in the current
gcc doc I verified that the respective statement (which indeed was
there in older versions) got deleted. I'm convinced that it was
there because on architectures where read-modify-write operations
on memory operands don't exist, this indeed is necessary. But we're
talking about x86-specific code here.

Linux changed this in 2006 (commit 92934bcbf9), but later added a
workaround for problems with gcc below 4.1 (which we don't care
about). Interestingly it was also in 2006 that Keir changed our copy

Bottom line - I'll simply remove the comment as being wrong.


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.