lkml.org 
[lkml]   [2017]   [Jun]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC][PATCH] atomic: Fix atomic_set_release() for 'funny' architectures
From
Date
On 6/9/2017 7:05 AM, Peter Zijlstra wrote:
> Subject: atomic: Fix atomic_set_release() for 'funny' architectures
>
> Those architectures that have a special atomic_set implementation also
> need a special atomic_set_release(), because for the very same reason
> WRITE_ONCE() is broken for them, smp_store_release() is too.
>
> The vast majority is architectures that have spinlock hash based atomic
> implementation except hexagon which seems to have a hardware 'feature'.
>
> The spinlock based atomics should be SC, that is, none of them appear to
> place extra barriers in atomic_cmpxchg() or any of the other SC atomic
> primitives and therefore seem to rely on their spinlock implementation
> being SC (I did not fully validate all that).
>
> Therefore, the normal atomic_set() is SC and can be used at
> atomic_set_release().

Acked-by: Chris Metcalf <cmetcalf@mellanox.com> [for tile]

--
Chris Metcalf, Mellanox Technologies
http://www.mellanox.com

\
 
 \ /
  Last update: 2017-06-12 01:48    [W:0.149 / U:3.072 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site