Re: [PATCH v4 1/4] lib: Introduce atomic MMIO modify

2013-08-29 Thread Thomas Petazzoni
Dear Andrew Morton, On Wed, 28 Aug 2013 12:33:52 -0700, Andrew Morton wrote: > > > It only works if both subsystems agree to use atomic_io_modify(). And > > > if they're both capable of doing that, they are both capable of > > > implementing an agreed-upon internal locking scheme, so why bother?

Re: [PATCH v4 1/4] lib: Introduce atomic MMIO modify

2013-08-28 Thread Andrew Morton
On Wed, 28 Aug 2013 07:24:23 -0300 Ezequiel Garcia wrote: > On Tue, Aug 27, 2013 at 01:37:09PM -0700, Andrew Morton wrote: > > On Sat, 24 Aug 2013 12:35:29 -0300 Ezequiel Garcia > > wrote: > > > > > Some platforms have MMIO regions that are shared across orthogonal > > > subsystems. This comm

Re: [PATCH v4 1/4] lib: Introduce atomic MMIO modify

2013-08-28 Thread Linus Torvalds
On Wed, Aug 28, 2013 at 3:37 AM, Ezequiel Garcia wrote: > Linus, > > Andrew suggested you might have opinions on this, so I'm cc'ing you. > Since you'll probably want some better context, here it is: > > http://lwn.net/Articles/564709/ > > On Sat, Aug 24, 2013 at 12:35:29PM -0300, Ezequiel Garcia

Re: [PATCH v4 1/4] lib: Introduce atomic MMIO modify

2013-08-28 Thread Ezequiel Garcia
Linus, Andrew suggested you might have opinions on this, so I'm cc'ing you. Since you'll probably want some better context, here it is: http://lwn.net/Articles/564709/ On Sat, Aug 24, 2013 at 12:35:29PM -0300, Ezequiel Garcia wrote: > Some platforms have MMIO regions that are shared across ortho

Re: [PATCH v4 1/4] lib: Introduce atomic MMIO modify

2013-08-28 Thread Ezequiel Garcia
On Tue, Aug 27, 2013 at 01:37:09PM -0700, Andrew Morton wrote: > On Sat, 24 Aug 2013 12:35:29 -0300 Ezequiel Garcia > wrote: > > > Some platforms have MMIO regions that are shared across orthogonal > > subsystems. This commit implements a possible solution for the > > thread-safe access of such

Re: [PATCH v4 1/4] lib: Introduce atomic MMIO modify

2013-08-27 Thread Andrew Morton
On Sat, 24 Aug 2013 12:35:29 -0300 Ezequiel Garcia wrote: > Some platforms have MMIO regions that are shared across orthogonal > subsystems. This commit implements a possible solution for the > thread-safe access of such regions through a spinlock-protected API. Seem sensible. Perhaps. It onl

Re: [PATCH v4 1/4] lib: Introduce atomic MMIO modify

2013-08-27 Thread Ezequiel Garcia
(Adding Andrew Morton in Cc) On Sat, Aug 24, 2013 at 12:35:29PM -0300, Ezequiel Garcia wrote: > Some platforms have MMIO regions that are shared across orthogonal > subsystems. This commit implements a possible solution for the > thread-safe access of such regions through a spinlock-protected API.

Re: [PATCH v4 1/4] lib: Introduce atomic MMIO modify

2013-08-24 Thread Russell King - ARM Linux
On Sat, Aug 24, 2013 at 04:58:59PM -0300, Ezequiel Garcia wrote: > On Sat, Aug 24, 2013 at 08:27:10PM +0200, richard -rw- weinberger wrote: > > On Sat, Aug 24, 2013 at 5:35 PM, Ezequiel Garcia > > wrote: > > > Some platforms have MMIO regions that are shared across orthogonal > > > subsystems. Thi

Re: [PATCH v4 1/4] lib: Introduce atomic MMIO modify

2013-08-24 Thread Richard Weinberger
Am 24.08.2013 22:49, schrieb Ezequiel Garcia: > On Sat, Aug 24, 2013 at 10:35:34PM +0200, Richard Weinberger wrote: >> Am 24.08.2013 21:58, schrieb Ezequiel Garcia: >>> On Sat, Aug 24, 2013 at 08:27:10PM +0200, richard -rw- weinberger wrote: On Sat, Aug 24, 2013 at 5:35 PM, Ezequiel Garcia >>>

Re: [PATCH v4 1/4] lib: Introduce atomic MMIO modify

2013-08-24 Thread Ezequiel Garcia
On Sat, Aug 24, 2013 at 10:35:34PM +0200, Richard Weinberger wrote: > Am 24.08.2013 21:58, schrieb Ezequiel Garcia: > > On Sat, Aug 24, 2013 at 08:27:10PM +0200, richard -rw- weinberger wrote: > >> On Sat, Aug 24, 2013 at 5:35 PM, Ezequiel Garcia > >> wrote: > >>> Some platforms have MMIO regions

Re: [PATCH v4 1/4] lib: Introduce atomic MMIO modify

2013-08-24 Thread Richard Weinberger
Am 24.08.2013 21:58, schrieb Ezequiel Garcia: > On Sat, Aug 24, 2013 at 08:27:10PM +0200, richard -rw- weinberger wrote: >> On Sat, Aug 24, 2013 at 5:35 PM, Ezequiel Garcia >> wrote: >>> Some platforms have MMIO regions that are shared across orthogonal >>> subsystems. This commit implements a pos

Re: [PATCH v4 1/4] lib: Introduce atomic MMIO modify

2013-08-24 Thread Ezequiel Garcia
On Sat, Aug 24, 2013 at 08:27:10PM +0200, richard -rw- weinberger wrote: > On Sat, Aug 24, 2013 at 5:35 PM, Ezequiel Garcia > wrote: > > Some platforms have MMIO regions that are shared across orthogonal > > subsystems. This commit implements a possible solution for the > > thread-safe access of s

Re: [PATCH v4 1/4] lib: Introduce atomic MMIO modify

2013-08-24 Thread richard -rw- weinberger
On Sat, Aug 24, 2013 at 5:35 PM, Ezequiel Garcia wrote: > Some platforms have MMIO regions that are shared across orthogonal > subsystems. This commit implements a possible solution for the > thread-safe access of such regions through a spinlock-protected API. > > Concurrent access is protected wi

[PATCH v4 1/4] lib: Introduce atomic MMIO modify

2013-08-24 Thread Ezequiel Garcia
Some platforms have MMIO regions that are shared across orthogonal subsystems. This commit implements a possible solution for the thread-safe access of such regions through a spinlock-protected API. Concurrent access is protected with a single spinlock for the entire MMIO address space. While this