lkml.org 
[lkml]   [2017]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 13/17] RISC-V: Add include subdirectory
On Wed, Jun 07, 2017 at 02:58:50PM +0200, Peter Zijlstra wrote:
> On Wed, Jun 07, 2017 at 02:36:27PM +0200, Peter Zijlstra wrote:
> > Which (pending the sub confusion) will generate the entire set of:
> >
> > atomic_add, atomic_add_return{_relaxed,_acquire,_release,} atomic_fetch_add{_relaxed,_acquire,_release,}
> > atomic_sub, atomic_sub_return{_relaxed,_acquire,_release,} atomic_fetch_sub{_relaxed,_acquire,_release,}
> >
> > atomic_and, atomic_fetch_and{_relaxed,_acquire,_release,}
> > atomic_or, atomic_fetch_or{_relaxed,_acquire,_release,}
> > atomic_xor, atomic_fetch_xor{_relaxed,_acquire,_release,}
> >
>
> Another approach would be to override __atomic_op_{acquire,release} and
> use things like:
>
> "FENCE r,rw" -- (load) ACQUIRE
> "FENCE rw,w" -- (store) RELEASE
>
> And then you only need to provide _relaxed atomics.
>
> Also, and I didn't check for that, you need to provide:
>
> smp_load_acquire(), smp_store_release(), atomic_read_acquire(),
> atomic_store_release().

Also, you probably need to provide smp_mb__before_spinlock(), but also
see:

https://lkml.kernel.org/r/20170607161501.819948352@infradead.org

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