Re: [PATCH] atomic{64}_t: Explicitly specify data storage length and alignment

2018-07-09 Thread kbuild test robot
Hi Alexey, I love your patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v4.18-rc4 next-20180709] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits

Re: [PATCH] atomic{64}_t: Explicitly specify data storage length and alignment

2018-07-09 Thread kbuild test robot
Hi Alexey, I love your patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v4.18-rc4 next-20180709] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits

Re: [PATCH] atomic{64}_t: Explicitly specify data storage length and alignment

2018-07-09 Thread Peter Zijlstra
On Mon, Jul 09, 2018 at 02:30:41PM +, Alexey Brodkin wrote: > Hm, any thoughts on why it's "u64" for 32-bit x86? Accident probably. It probably doesn't really matter all that much because the kernel hard assumes 2s complement, but it is somewhat inconsistent. _

Re: [PATCH] atomic{64}_t: Explicitly specify data storage length and alignment

2018-07-09 Thread Alexey Brodkin
Hi Peter, On Mon, 2018-07-09 at 15:35 +0200, Peter Zijlstra wrote: > On Mon, Jul 09, 2018 at 03:47:41PM +0300, Alexey Brodkin wrote: > > diff --git a/include/asm-generic/atomic64.h b/include/asm-generic/atomic64.h > > index 8d28eb010d0d..b94b749b5952 100644 > > --- a/include/asm-generic/atomic64.h

Re: [PATCH] atomic{64}_t: Explicitly specify data storage length and alignment

2018-07-09 Thread Russell King - ARM Linux
On Mon, Jul 09, 2018 at 03:47:41PM +0300, Alexey Brodkin wrote: > Atomic instructions require data they operate on to be aligned > according to data size. I.e. 32-bit atomic values must be 32-bit > aligned while 64-bit values must be 64-bit aligned. > > Otherwise even if CPU may handle not-aligend

Re: [PATCH] atomic{64}_t: Explicitly specify data storage length and alignment

2018-07-09 Thread Geert Uytterhoeven
On Mon, Jul 9, 2018 at 3:29 PM David Laight wrote: > From: Alexey Brodkin > > Sent: 09 July 2018 13:48 > > Atomic instructions require data they operate on to be aligned > > according to data size. I.e. 32-bit atomic values must be 32-bit > > aligned while 64-bit values must be 64-bit aligned. > >

Re: [PATCH] atomic{64}_t: Explicitly specify data storage length and alignment

2018-07-09 Thread Peter Zijlstra
On Mon, Jul 09, 2018 at 03:47:41PM +0300, Alexey Brodkin wrote: > diff --git a/include/asm-generic/atomic64.h b/include/asm-generic/atomic64.h > index 8d28eb010d0d..b94b749b5952 100644 > --- a/include/asm-generic/atomic64.h > +++ b/include/asm-generic/atomic64.h > @@ -13,7 +13,7 @@ > #define _ASM_

RE: [PATCH] atomic{64}_t: Explicitly specify data storage length and alignment

2018-07-09 Thread David Laight
From: Alexey Brodkin > Sent: 09 July 2018 13:48 > Atomic instructions require data they operate on to be aligned > according to data size. I.e. 32-bit atomic values must be 32-bit > aligned while 64-bit values must be 64-bit aligned. > > Otherwise even if CPU may handle not-aligend normal data acc

Re: [PATCH] atomic{64}_t: Explicitly specify data storage length and alignment

2018-07-09 Thread Will Deacon
On Mon, Jul 09, 2018 at 03:47:41PM +0300, Alexey Brodkin wrote: > Atomic instructions require data they operate on to be aligned > according to data size. I.e. 32-bit atomic values must be 32-bit > aligned while 64-bit values must be 64-bit aligned. > > Otherwise even if CPU may handle not-aligend

Re: [PATCH] atomic{64}_t: Explicitly specify data storage length and alignment

2018-07-09 Thread Geert Uytterhoeven
Hi Alexey, On Mon, Jul 9, 2018 at 2:48 PM Alexey Brodkin wrote: > Atomic instructions require data they operate on to be aligned > according to data size. I.e. 32-bit atomic values must be 32-bit > aligned while 64-bit values must be 64-bit aligned. > > Otherwise even if CPU may handle not-aligen

[PATCH] atomic{64}_t: Explicitly specify data storage length and alignment

2018-07-09 Thread Alexey Brodkin
Atomic instructions require data they operate on to be aligned according to data size. I.e. 32-bit atomic values must be 32-bit aligned while 64-bit values must be 64-bit aligned. Otherwise even if CPU may handle not-aligend normal data access, still atomic instructions fail and typically raise an