lkml.org 
[lkml]   [2014]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Fix the x86 specializations of atomic_[set|clear]_mask
On Wed, Oct 15, 2014 at 04:38:01PM -0400, Patrick Palka wrote:
> This patch fixes a number of issues with these specializations:
>
> 1. The memory operand inside the asm specification is erroneously
> declared read-only instead of read-write.
>
> 2. There is no reason to require the 1st operand of andl/orl to be
> inside a register; the 1st operand could also be an immediate operand.
> So change its specification from "r" to "ir".
>
> 3. Since addr is supposed to be an atomic_t *, the memory operand
> should be addr->counter and not *addr.
>
> 4. These specializations should be inline functions instead of macros.
>
> 5. Finally, the "memory" clobbers are unnecessary, so they should be
> removed. (This is in line with the other atomic functions such as
> atomic_add and atomic_sub, the likes of which do not have a "memory"
> clobber.)

No real problem with this, but I'm going to kill off these functions
when I get a little time :)


\
 
 \ /
  Last update: 2014-10-16 10:21    [W:0.253 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site