Thread (53 messages) 53 messages, 10 authors, 2015-07-15

Re: [PATCH] tile: Provide atomic_{or,xor,and}

From: Peter Zijlstra <peterz@infradead.org>
Date: 2015-07-09 20:50:25
Also in: lkml

On Thu, Jul 09, 2015 at 04:38:17PM -0400, Chris Metcalf wrote:
Implement atomic logic ops -- atomic_{or,xor,and}.

For tilegx, these are relatively straightforward; the architecture
provides atomic "or" and "and", both 32-bit and 64-bit.  To support
xor we provide a loop using "cmpexch".

For the older 32-bit tilepro architecture, we have to extend
the set of low-level assembly routines to include 32-bit "and",
as well as all three 64-bit routines.  Somewhat confusingly,
some 32-bit versions are already used by the bitops inlines, with
parameter types appropriate for bitops, so we have to do a bit of
casting to match "int" to "unsigned long".

Signed-off-by: Chris Metcalf <redacted>
---
Peter, I'm guessing you should just take this into your series,
rather than my pushing it through the tile tree.
Awesome, thanks! Yeah, I'll collect the lot.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help