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

Re: [Xen-devel] [PATCH 2/2] x86: consolidate atomic build_*() macros



>>> On 09.06.17 at 20:45, <andrew.cooper3@xxxxxxxxxx> wrote:
> On 09/06/17 13:44, Jan Beulich wrote:
>> Use a single macro to define both read and write inline functions.
>> Avoid redundant inputs (including quotes - use stringification
>> instead). Generalize "add" to ease eventual addition of other
>> artihmetic operations.
>>
>> At once correct the artihmetic asm()'s output constraint (needs to be
>> "+" instead of "="), its 64-bit immediate one, and permit suitable
>> immediates for writes.
>>
>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> 
> I can appreciate what you are trying to do here, but it is a step
> backwards in terms of readability.  At least in the past, if you needed
> to find the implementation of read_u16_atomic, you could grep for it. 
> Its now completely hidden from any tools.

But these are helper functions needed only in nearby code, so
anyone looking for their definition when (s)he's not already
looking at this code is very likely misguided. IOW hiding them
from any such tools is kind of a nice side effect in this specific
case.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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