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

Re: [Xen-devel] [PATCHv2 3/6] xen: generic xadd() for ticket locks



On 17/04/15 13:32, Ian Campbell wrote:
> On Thu, 2015-04-16 at 16:28 +0100, Jan Beulich wrote:
>>>>> On 10.04.15 at 16:19, <david.vrabel@xxxxxxxxxx> wrote:
>>> +#define xadd(ptr, v) generic_xaddl((ptr), (v))
>>
>> I think it is at least confusing to call the thing xadd (looking to be
>> size generic) and then expand to generic_xaddl (only supporting
>> 32-bit operations), yet subsequently implementing a size-generic
>> xadd() for x86.
> 
> Indeed, and I went to build on arm32 prior to hacking up a proper xadd
> and:
> 
> spinlock.c: In function â_spin_lockâ:
> spinlock.c:145:5: error: passing argument 1 of âgeneric_xaddlâ from 
> incompatible pointer type [-Werror]
>      tickets.head_tail = xadd(&lock->tickets, tickets.head_tail);
>      ^
> spinlock.c:15:12: note: expected âvolatile u32 *â but argument is of type 
> âunion spinlock_tickets_t *â
>  static u32 generic_xaddl(volatile u32 *ptr, u32 v)
>             ^
> 
> (I hope to knock up the arm asm version in the next hour or so, so you
> may not care...)

Can you use

  git://xenbits.xen.org/people/dvrabel/xen.git ticketlocks-v3

as a base instead?

David

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

 


Rackspace

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