Re: [PATCHv2 05/16] atomics: prepare for atomic64_fetch_add_unless()

2018-06-06 Thread Michael Ellerman
Mark Rutland writes: > On Tue, Jun 05, 2018 at 08:54:03PM +1000, Michael Ellerman wrote: >> Mark Rutland writes: >> > On Tue, Jun 05, 2018 at 11:26:37AM +0200, Peter Zijlstra wrote: >> >> On Tue, May 29, 2018 at 04:43:35PM +0100, Mark Rutland wrote: >> >> > /** >> >> > + * atomic64_add_unless

Re: [PATCHv2 05/16] atomics: prepare for atomic64_fetch_add_unless()

2018-06-06 Thread Michael Ellerman
Mark Rutland writes: > On Tue, Jun 05, 2018 at 08:54:03PM +1000, Michael Ellerman wrote: >> Mark Rutland writes: >> > On Tue, Jun 05, 2018 at 11:26:37AM +0200, Peter Zijlstra wrote: >> >> On Tue, May 29, 2018 at 04:43:35PM +0100, Mark Rutland wrote: >> >> > /** >> >> > + * atomic64_add_unless

Re: [PATCHv2 05/16] atomics: prepare for atomic64_fetch_add_unless()

2018-06-05 Thread Mark Rutland
On Tue, Jun 05, 2018 at 08:54:03PM +1000, Michael Ellerman wrote: > Mark Rutland writes: > > On Tue, Jun 05, 2018 at 11:26:37AM +0200, Peter Zijlstra wrote: > >> On Tue, May 29, 2018 at 04:43:35PM +0100, Mark Rutland wrote: > >> > /** > >> > + * atomic64_add_unless - add unless the number is

Re: [PATCHv2 05/16] atomics: prepare for atomic64_fetch_add_unless()

2018-06-05 Thread Mark Rutland
On Tue, Jun 05, 2018 at 08:54:03PM +1000, Michael Ellerman wrote: > Mark Rutland writes: > > On Tue, Jun 05, 2018 at 11:26:37AM +0200, Peter Zijlstra wrote: > >> On Tue, May 29, 2018 at 04:43:35PM +0100, Mark Rutland wrote: > >> > /** > >> > + * atomic64_add_unless - add unless the number is

Re: [PATCHv2 05/16] atomics: prepare for atomic64_fetch_add_unless()

2018-06-05 Thread Michael Ellerman
Mark Rutland writes: > On Tue, Jun 05, 2018 at 11:26:37AM +0200, Peter Zijlstra wrote: >> On Tue, May 29, 2018 at 04:43:35PM +0100, Mark Rutland wrote: >> > /** >> > + * atomic64_add_unless - add unless the number is already a given value >> > + * @v: pointer of type atomic_t >> > + * @a: the

Re: [PATCHv2 05/16] atomics: prepare for atomic64_fetch_add_unless()

2018-06-05 Thread Michael Ellerman
Mark Rutland writes: > On Tue, Jun 05, 2018 at 11:26:37AM +0200, Peter Zijlstra wrote: >> On Tue, May 29, 2018 at 04:43:35PM +0100, Mark Rutland wrote: >> > /** >> > + * atomic64_add_unless - add unless the number is already a given value >> > + * @v: pointer of type atomic_t >> > + * @a: the

Re: [PATCHv2 05/16] atomics: prepare for atomic64_fetch_add_unless()

2018-06-05 Thread Mark Rutland
On Tue, Jun 05, 2018 at 11:26:37AM +0200, Peter Zijlstra wrote: > On Tue, May 29, 2018 at 04:43:35PM +0100, Mark Rutland wrote: > > /** > > + * atomic64_add_unless - add unless the number is already a given value > > + * @v: pointer of type atomic_t > > + * @a: the amount to add to v... > > + *

Re: [PATCHv2 05/16] atomics: prepare for atomic64_fetch_add_unless()

2018-06-05 Thread Mark Rutland
On Tue, Jun 05, 2018 at 11:26:37AM +0200, Peter Zijlstra wrote: > On Tue, May 29, 2018 at 04:43:35PM +0100, Mark Rutland wrote: > > /** > > + * atomic64_add_unless - add unless the number is already a given value > > + * @v: pointer of type atomic_t > > + * @a: the amount to add to v... > > + *

Re: [PATCHv2 05/16] atomics: prepare for atomic64_fetch_add_unless()

2018-06-05 Thread Peter Zijlstra
On Tue, May 29, 2018 at 04:43:35PM +0100, Mark Rutland wrote: > /** > + * atomic64_add_unless - add unless the number is already a given value > + * @v: pointer of type atomic_t > + * @a: the amount to add to v... > + * @u: ...unless v is equal to u. > + * > + * Atomically adds @a to @v, so long

Re: [PATCHv2 05/16] atomics: prepare for atomic64_fetch_add_unless()

2018-06-05 Thread Peter Zijlstra
On Tue, May 29, 2018 at 04:43:35PM +0100, Mark Rutland wrote: > /** > + * atomic64_add_unless - add unless the number is already a given value > + * @v: pointer of type atomic_t > + * @a: the amount to add to v... > + * @u: ...unless v is equal to u. > + * > + * Atomically adds @a to @v, so long

[PATCHv2 05/16] atomics: prepare for atomic64_fetch_add_unless()

2018-05-29 Thread Mark Rutland
Currently architecture must implement atomic_fetch_add_unless(), with common code providing atomic_add_unless(). Architectures must also implement atmic64_add_unless() directly, with no corresponding atomic64_fetch_add_unless(). This divergenece is unfortunate, and means that the APIs for

[PATCHv2 05/16] atomics: prepare for atomic64_fetch_add_unless()

2018-05-29 Thread Mark Rutland
Currently architecture must implement atomic_fetch_add_unless(), with common code providing atomic_add_unless(). Architectures must also implement atmic64_add_unless() directly, with no corresponding atomic64_fetch_add_unless(). This divergenece is unfortunate, and means that the APIs for