[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160315131748.GY6344@twins.programming.kicks-ass.net>
Date: Tue, 15 Mar 2016 14:17:48 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Ingo Molnar <mingo@...nel.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Frédéric Weisbecker <fweisbec@...il.com>,
Thomas Gleixner <tglx@...utronix.de>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] atomic: Fix bugs in 'fetch_or()' and rename it to
'xchg_or()'
On Tue, Mar 15, 2016 at 01:32:53PM +0100, Ingo Molnar wrote:
> So if we are still on the same page at this point, we'd have to add a pointer
> variant too I suspect:
>
> cmpxchg_ptr()
> xchg_ptr()
We typically call those _long(), like atomic_long_t etc.. Under the
assumption that sizeof(long) == sizeof(void *).
Also, _IF_ we're going to do this, this is the perfect opportunity to
also introduce the __atomic address space and load() and store()
operations. This is needed for architectures where:
cmpxchg()/xchg()
isn't safe against regular stores, like all those who implement atomics
using hashed spinlocked.
Its going to be a horrid lot of work though :/
Powered by blists - more mailing lists